PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / pr22098-1.c
blob7e876fa8cd16cf25f5b88cfb56b594a423da088a
1 extern void abort (void);
2 extern void exit (int);
3 typedef __UINTPTR_TYPE__ uintptr_t;
4 int
5 main (void)
7 int a = 0;
8 int *p;
9 uintptr_t b;
10 b = (uintptr_t)(p = &(int []){0, 1, 2}[++a]);
11 if (a != 1 || *p != 1 || *(int *)b != 1)
12 abort ();
13 exit (0);