OSDN Git Service

* tree-loop-linear.c (try_interchange_loops): Compare memory access
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / tree-ssa / 20070302-1.c
1 /* { dg-do link } */
2 /* { dg-xfail-if "" { *-*-* } { "*" } { "" } }  See PR34743.  */
3 /* { dg-options "-O2" } */
4
5 struct A
6 {
7   int x;
8   float y;
9 };
10
11 volatile float X, Y;
12
13 int __attribute__ ((__noinline__))
14 baz (struct A *z, struct A *y)
15 {
16   z->x = (int) X;
17   z->y = Y;
18   y->x = (int) X;
19   y->y = Y;
20 }
21
22
23 struct A B;
24
25 float foo (int i)
26 {
27   struct A *p, x, y, z;
28
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;
34
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 ();
41 }
42
43 main(int argc, char **argv)
44 {
45   foo (argc);
46 }