gcc/testsuite/gcc.dg/lto/attr-weakref-1_0.c
raw| 1 | /* { dg-lto-do run } */ |
| 2 | int first = 0; |
| 3 | void abort (void); |
| 4 | void c (void); |
| 5 | void b (void); |
| 6 | int second = 0; |
| 7 | void callmealias (void) |
| 8 | { |
| 9 | if (!first || !second) |
| 10 | abort (); |
| 11 | } |
| 12 | void callmefirst (void) |
| 13 | { |
| 14 | if (first) |
| 15 | abort(); |
| 16 | first = 1; |
| 17 | } |
| 18 | void callmesecond (void) |
| 19 | { |
| 20 | if (!first) |
| 21 | abort(); |
| 22 | if (second) |
| 23 | abort(); |
| 24 | second = 1; |
| 25 | } |
| 26 | int |
| 27 | main() |
| 28 | { |
| 29 | c(); |
| 30 | b(); |
| 31 | return 0; |
| 32 | } |