| 1 |
/* { dg-lto-options {{-O2 -DOPTIMIZE -flto -flto-partition=1to1} {-O0 -flto -flto-partition=1to1}} } */ |
| 2 |
|
| 3 |
extern void abort (void); |
| 4 |
extern int foo (void); |
| 5 |
|
| 6 |
int |
| 7 |
f (void) |
| 8 |
{ |
| 9 |
return 1; |
| 10 |
} |
| 11 |
|
| 12 |
extern inline int __attribute__((gnu_inline)) |
| 13 |
e_inline_baz (void) |
| 14 |
{ |
| 15 |
return 1 + f(); |
| 16 |
} |
| 17 |
|
| 18 |
int |
| 19 |
bar (void) |
| 20 |
{ |
| 21 |
return e_inline_baz (); |
| 22 |
} |
| 23 |
|
| 24 |
int |
| 25 |
main () |
| 26 |
{ |
| 27 |
#ifdef OPTIMIZE |
| 28 |
if (bar () != 2 || foo () != 3) |
| 29 |
abort (); |
| 30 |
#else |
| 31 |
if (bar () != 0 || foo () != 0) |
| 32 |
abort (); |
| 33 |
#endif |
| 34 |
return 0; |
| 35 |
} |