1 /* { dg-options "-O2 -fdump-tree-modref1"  } */
2 /* { dg-do run } */
3 __attribute__ ((noinline))
4 void
copy(int * a,int * b)5 copy (int *a, int *b)
6 {
7   *a=*b;
8 }
9 int p, *ptr = &p;
10 __attribute__ ((noinline))
11 void
barrier()12 barrier ()
13 {
14   asm ("":"=r"(ptr):"0"(ptr));
15 }
16 int
main()17 main()
18 {
19   int a = 1, b = 2;
20   copy (&a,&b);
21   barrier ();
22   *ptr = 1;
23   if (!__builtin_constant_p (b == 2))
24     __builtin_abort ();
25   return 0;
26 }
27 /* { dg-final { scan-tree-dump "parm 1 flags: nodirectescape" "modref1"  } } */
28