gcc/testsuite/gcc.dg/lto/pr101949_0.c
raw| 1 | /* { dg-lto-do run } */ |
| 2 | /* { dg-lto-options { "-O2 -fipa-pta -flto -flto-partition=1to1" } } */ |
| 3 | |
| 4 | extern int bar (int (*)(int *), int *); |
| 5 | |
| 6 | static int x; |
| 7 | |
| 8 | static int __attribute__ ((noinline)) foo (int *p) |
| 9 | { |
| 10 | *p = 1; |
| 11 | x = 0; |
| 12 | return *p; |
| 13 | } |
| 14 | |
| 15 | int main () |
| 16 | { |
| 17 | if (bar (foo, &x) != 0) |
| 18 | __builtin_abort (); |
| 19 | return 0; |
| 20 | } |