| 1 |
/* { dg-lto-do run } */ |
| 2 |
/* { dg-lto-options { {-O2 -flto-partition=max -fdump-ipa-modref -fno-ipa-sra -fno-ipa-cp -flto} } } */ |
| 3 |
/* { dg-require-effective-target linker_plugin } */ |
| 4 |
extern void copy (int *a, int *b); |
| 5 |
extern void barrier (); |
| 6 |
extern int *ptr; |
| 7 |
int |
| 8 |
main() |
| 9 |
{ |
| 10 |
int a = 1, b = 2; |
| 11 |
copy (&a,&b); |
| 12 |
barrier (); |
| 13 |
*ptr = 1; |
| 14 |
if (!__builtin_constant_p (b == 2)) |
| 15 |
__builtin_abort (); |
| 16 |
return 0; |
| 17 |
} |
| 18 |
/* { dg-final { scan-wpa-ipa-dump "parm 1 flags: no_direct_clobber no_direct_escape" "modref" } } */ |