gcc/testsuite/gcc.dg/ipa/pr101066.c
raw| 1 | /* { dg-do run } */ |
| 2 | /* { dg-options "-Os -fno-ipa-cp -fno-inline" } */ |
| 3 | |
| 4 | int a = 1, c, d, e; |
| 5 | int *b = &a; |
| 6 | static int g(int *h) { |
| 7 | c = *h; |
| 8 | return d; |
| 9 | } |
| 10 | static void f(int *h) { |
| 11 | e = *h; |
| 12 | *b = 0; |
| 13 | g(h); |
| 14 | } |
| 15 | int main() { |
| 16 | f(b); |
| 17 | if (c) |
| 18 | __builtin_abort(); |
| 19 | return 0; |
| 20 | } |