1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
/* { dg-do run } */ /* { dg-options "-fno-tree-ccp -fno-tree-fre" } */ extern void abort (void); static int g[1]; static int * const p = &g[0]; static int * const q = &g[0]; int main(void) { g[0] = 1; *p = 0; *p = *q; if (g[0] != 0) abort (); return 0; }