Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / gcc.c-torture / execute / 20020129-1.c
blob6430c4c1c2f810d70d8d05d7bd6f8654cea6ec5a
1 /* This testcase failed at -O2 on IA-64, because scheduling did not take
2 into account conditional execution when using cselib for alias
3 analysis. */
5 struct D { int d1; struct D *d2; };
6 struct C { struct D c1; long c2, c3, c4, c5, c6; };
7 struct A { struct A *a1; struct C *a2; };
8 struct B { struct C b1; struct A *b2; };
10 extern void abort (void);
11 extern void exit (int);
13 void
14 foo (struct B *x, struct B *y)
16 if (x->b2 == 0)
18 struct A *a;
20 x->b2 = a = y->b2;
21 y->b2 = 0;
22 for (; a; a = a->a1)
23 a->a2 = &x->b1;
26 if (y->b2 != 0)
27 abort ();
29 if (x->b1.c3 == -1)
31 x->b1.c3 = y->b1.c3;
32 x->b1.c4 = y->b1.c4;
33 y->b1.c3 = -1;
34 y->b1.c4 = 0;
37 if (y->b1.c3 != -1)
38 abort ();
41 struct B x, y;
43 int main ()
45 y.b1.c1.d1 = 6;
46 y.b1.c3 = 145;
47 y.b1.c4 = 2448;
48 x.b1.c3 = -1;
49 foo (&x, &y);
50 exit (0);