gcc/testsuite/gcc.c-torture/execute/20070824-1.c
raw| 1 | /* PR tree-optimization/33136 */ |
| 2 | |
| 3 | extern void abort (void); |
| 4 | |
| 5 | struct S |
| 6 | { |
| 7 | struct S *a; |
| 8 | int b; |
| 9 | }; |
| 10 | |
| 11 | int |
| 12 | main (void) |
| 13 | { |
| 14 | struct S *s = (struct S *) 0, **p, *n; |
| 15 | for (p = &s; *p; p = &(*p)->a); |
| 16 | n = (struct S *) __builtin_alloca (sizeof (*n)); |
| 17 | n->a = *p; |
| 18 | n->b = 1; |
| 19 | *p = n; |
| 20 | |
| 21 | if (!s) |
| 22 | abort (); |
| 23 | return 0; |
| 24 | } |