gcc/testsuite/gcc.dg/torture/pr52406.c
raw| 1 | /* { dg-do run } */ |
| 2 | |
| 3 | extern void abort (void); |
| 4 | struct { int f1; } a[2]; |
| 5 | |
| 6 | int *b, *const k = &a[1].f1; |
| 7 | static int **c = &b; |
| 8 | |
| 9 | int e, f, d; |
| 10 | |
| 11 | int |
| 12 | main () |
| 13 | { |
| 14 | int **l = &b; |
| 15 | *l = k; |
| 16 | for (; d <= 0; d++) |
| 17 | { |
| 18 | int *j = &e; |
| 19 | **c = 1; |
| 20 | *l = k; |
| 21 | *k ^= 0; |
| 22 | f = **l; |
| 23 | *j = f; |
| 24 | } |
| 25 | if (e != 1) |
| 26 | abort (); |
| 27 | return 0; |
| 28 | } |
| 29 |