gcc/testsuite/gcc.dg/pr51865.c
raw| 1 | /* PR tree-optimization/51865 */ |
| 2 | /* { dg-do compile } */ |
| 3 | /* { dg-options "-O2 -fipa-pta" } */ |
| 4 | |
| 5 | void fn (const char *, const char *) __attribute__ ((__noreturn__)); |
| 6 | int var; |
| 7 | |
| 8 | inline void |
| 9 | foo (void) |
| 10 | { |
| 11 | if (__builtin_expect (var != 0, 0)) |
| 12 | fn ("a", "b"); |
| 13 | }; |
| 14 | |
| 15 | void |
| 16 | bar (void) |
| 17 | { |
| 18 | foo (); |
| 19 | }; |
| 20 | |
| 21 | void |
| 22 | baz (void) |
| 23 | { |
| 24 | foo (); |
| 25 | }; |