aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/pr14092-1.c
blob: 61fc8f7016df667a4e9e1a2e7b179d2ca8292640 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* PR c/14092
 * Origin: bonzini@gnu.org
 * rejects-valid
 */
/* { dg-do compile } */

/* Define this so that we are more portable.  The testcase in the
   PR failed on 64-bit hosts.  */
__extension__ typedef __INTPTR_TYPE__ intptr_t;

typedef struct _PLCI {
  unsigned char x;
  unsigned char buf[1];
} PLCI;

void nl_ind(PLCI * plci)
{
  plci->x = -((intptr_t)(plci->buf)) & 3;
}