gcc/testsuite/gcc.dg/20050330-2.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-require-profiling "-fprofile-generate" } */ |
| 3 | /* { dg-options "-O2 -fprofile-generate" } */ |
| 4 | |
| 5 | struct S |
| 6 | { |
| 7 | int a; |
| 8 | void **b; |
| 9 | }; |
| 10 | |
| 11 | void |
| 12 | foo (struct S *x, int y) |
| 13 | { |
| 14 | if (!x) |
| 15 | return; |
| 16 | if (y >= x->a) |
| 17 | return; |
| 18 | x->a--; |
| 19 | for (; y < x->a; y++) |
| 20 | x->b[y] = x->b[y + 1]; |
| 21 | x->b[x->a] = (void *) 0; |
| 22 | } |