20070302-1.c (baz): Mark with attribute noinline.
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / 20070302-1.c
blobab8e38e1dd6536443602bd607b0ca10ecd9d5875
1 /* { dg-do link } */
2 /* { dg-xfail-if "" { *-*-* } { "*" } { "" } } See PR34743. */
3 /* { dg-options "-O2" } */
5 struct A
7 int x;
8 float y;
9 };
11 volatile float X, Y;
13 int __attribute__ ((__noinline__))
14 baz (struct A *z, struct A *y)
16 z->x = (int) X;
17 z->y = Y;
18 y->x = (int) X;
19 y->y = Y;
23 struct A B;
25 float foo (int i)
27 struct A *p, x, y, z;
29 p = (i > 10) ? &x : &z;
30 x.y = 3.0;
31 p->x += baz (&z, &y);
32 X = z.y;
33 Y = p->y;
35 /* This predicate should always evaluate to false. The call to
36 baz() is not a clobbering site for x.y. The operand scanner was
37 considering it a clobbering site for x.y because x.y is in the
38 alias set of a call-clobbered memory tag. */
39 if (x.y != 3.0)
40 link_error ();
43 main(int argc, char **argv)
45 foo (argc);