PR testsuite/52641
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / 20070302-1.c
blob4b148f23df51160f9d3e6ea7a85eecba8bd44f38
1 /* { dg-do link } */
2 /* { dg-options "-O2" } */
4 struct A
6 int x;
7 float y;
8 };
10 volatile float X, Y;
12 int __attribute__ ((__noinline__))
13 baz (struct A *z, struct A *y)
15 z->x = (int) X;
16 z->y = Y;
17 y->x = (int) X;
18 y->y = Y;
22 struct A B;
24 float foo (int i)
26 struct A *p, x, y, z;
28 p = (i > 10) ? &x : &z;
29 x.y = 3.0;
30 p->x += baz (&z, &y);
31 X = z.y;
32 Y = p->y;
34 /* This predicate should always evaluate to false. The call to
35 baz() is not a clobbering site for x.y. The operand scanner was
36 considering it a clobbering site for x.y because x.y is in the
37 alias set of a call-clobbered memory tag. */
38 if (x.y != 3.0)
39 link_error ();
42 main(int argc, char **argv)
44 foo (argc);