gcc/testsuite/gcc.dg/lto/pr111157_0.c
raw| 1 | /* { dg-lto-do run } */ |
| 2 | /* { dg-lto-options { { -O2 -flto=auto } } } */ |
| 3 | /* { dg-extra-ld-options { -flto-partition=1to1 } } */ |
| 4 | |
| 5 | extern __attribute__((noinline)) |
| 6 | void foo (int *p); |
| 7 | |
| 8 | |
| 9 | void __attribute__((noinline)) |
| 10 | bar (void) |
| 11 | { |
| 12 | int istat; |
| 13 | |
| 14 | istat = 1234; |
| 15 | foo (&istat); |
| 16 | if (istat != 1234) |
| 17 | __builtin_abort (); |
| 18 | } |
| 19 | |
| 20 | int main (int argc, char **argv) |
| 21 | { |
| 22 | bar (); |
| 23 | return 0; |
| 24 | } |