| 1 |
/* { dg-lto-options {{ -O1 -flto -flto-partition=1to1 }} } */ |
| 2 |
/* { dg-lto-do run } */ |
| 3 |
|
| 4 |
/* Test that ipa-reference notice that get_val will not change since do_nothing does not |
| 5 |
modify anything. This needs streaming cross file boundary summaries. */ |
| 6 |
extern int get_val (void); |
| 7 |
extern int set_val (void); |
| 8 |
extern void do_nothing (void); |
| 9 |
void abort (void); |
| 10 |
int |
| 11 |
main() |
| 12 |
{ |
| 13 |
int a; |
| 14 |
int b; |
| 15 |
set_val (); |
| 16 |
a = get_val (); |
| 17 |
do_nothing(); |
| 18 |
b = get_val (); |
| 19 |
if (a==b) |
| 20 |
{ |
| 21 |
if (!__builtin_constant_p (a==b)) |
| 22 |
abort (); |
| 23 |
return 0; |
| 24 |
} |
| 25 |
else |
| 26 |
abort (); |
| 27 |
} |