aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/lto/modref-4_0.c
blob: 943758511462b3e9e4c656440e0a75a515de907c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* { dg-lto-do run } */
/* { dg-lto-options { {-O2 -flto-partition=max -fdump-ipa-modref -fno-ipa-sra -flto} } } */
extern void copy (int *a, int *b);
extern void barrier ();
extern int *ptr;
int
main()
{
  int a = 1, b = 2;
  copy (&a,&b);
  barrier ();
  *ptr = 1;
  if (!__builtin_constant_p (b == 2))
    __builtin_abort ();
  return 0;
}
/* { dg-final { scan-wpa-ipa-dump "parm 1 flags: no_direct_clobber no_direct_escape"  "modref"  } } */