libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / modref-5.c
blob0bee79d769d5a15e5ed14d4ed05bbabd73efce7e
1 /* { dg-options "-O2 -fdump-tree-modref1" } */
2 /* { dg-do run } */
3 __attribute__ ((noinline))
4 void
5 copy (int *a, int *b)
7 *a=*b;
9 int p, *ptr = &p;
10 __attribute__ ((noinline))
11 void
12 barrier ()
14 asm ("":"=r"(ptr):"0"(ptr));
16 int
17 main()
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;
27 /* { dg-final { scan-tree-dump "parm 1 flags: no_direct_clobber no_direct_escape" "modref1" } } */