gcc/testsuite/gcc.dg/torture/pr47426-1.c
raw| 1 | /* { dg-do run } */ |
| 2 | /* { dg-options "-fipa-pta" } */ |
| 3 | /* { dg-additional-sources "pr47426-2.c" } */ |
| 4 | |
| 5 | void bar (int *i); |
| 6 | |
| 7 | static void |
| 8 | foo (int *i) |
| 9 | { |
| 10 | if (*i) |
| 11 | bar (i); |
| 12 | if (*i) |
| 13 | __builtin_abort(); |
| 14 | } |
| 15 | |
| 16 | typedef void tfoo (int *); |
| 17 | |
| 18 | tfoo * |
| 19 | getfoo (void) |
| 20 | { |
| 21 | return &foo; |
| 22 | } |
| 23 |