aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/pr22098-2.c
blob: 035a755a5222bcbc69387df04ca599a46392c058 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
extern void abort (void);
extern void exit (int);
typedef __UINTPTR_TYPE__ uintptr_t;
int
main (void)
{
  int a = 0;
  int *p;
  uintptr_t b;
  b = (uintptr_t)(p = &(int []){0, 1, 2}[1]);
  if (*p != 1 || *(int *)b != 1)
    abort ();
  exit (0);
}