Debian Codegraph @

gcc/testsuite/gcc.dg/tree-ssa/modref-5.c

raw
1 /* { dg-options "-O2 -fdump-tree-modref1" } */
2 /* { dg-do run } */
3 __attribute__ ((noinline))
4 void
5 copy (int *a, int *b)
6 {
7 *a=*b;
8 }
9 int p, *ptr = &p;
10 __attribute__ ((noinline))
11 void
12 barrier ()
13 {
14 asm ("":"=r"(ptr):"0"(ptr));
15 }
16 int
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: no_direct_clobber no_direct_escape" "modref1" } } */