gcc/testsuite/gcc.dg/lto/pr113907_1.c
raw| 1 | __attribute__((used)) int val,val2 = 1; |
| 2 | |
| 3 | struct foo {int a;}; |
| 4 | |
| 5 | struct foo **ptr; |
| 6 | |
| 7 | __attribute__ ((noipa)) |
| 8 | int |
| 9 | test2 (void *a) |
| 10 | { |
| 11 | ptr = (struct foo **)a; |
| 12 | } |
| 13 | int test3 (void *a); |
| 14 | |
| 15 | int |
| 16 | test(void) |
| 17 | { |
| 18 | struct foo *fp; |
| 19 | test2 ((void *)&fp); |
| 20 | fp = (void *) 0; |
| 21 | (*ptr)++; |
| 22 | test3 ((void *)&fp); |
| 23 | } |
| 24 | |
| 25 | int testb (void); |
| 26 | |
| 27 | int |
| 28 | main() |
| 29 | { |
| 30 | for (int i = 0; i < val2; i++) |
| 31 | if (val) |
| 32 | testb (); |
| 33 | else |
| 34 | test(); |
| 35 | } |