Remove outermost loop parameter.
[official-gcc/graphite-test-results.git] / gcc / testsuite / gcc.dg / tree-ssa / pr2480.c
blobd7f7af4d2958bb985f08b5bc6b0a2ad111420361
1 /* { dg-do link } */
2 /* { dg-options "-O2" } */
4 /* We have enough cascading at -O2 to cover the missed control-dependence
5 in SCCVN (which considers the link_error calls to clobber the structs). */
7 struct example
9 char a;
10 int b;
11 char c;
12 } *ex1;
14 extern void link_error(void);
16 void
17 bar (void)
19 ex1->a = 1;
20 ex1->b = 2;
21 ex1->c = 3;
23 if (ex1->a != 1)
24 link_error ();
25 if (ex1->b != 2)
26 link_error ();
27 if (ex1->c != 3)
28 link_error ();
32 void
33 foo (struct example *ex2)
35 ex2->a = 1;
36 ex2->b = 2;
37 ex2->c = 3;
39 if (ex2->a != 1)
40 link_error ();
41 if (ex2->b != 2)
42 link_error ();
43 if (ex2->c != 3)
44 link_error ();
48 int main (void)
50 bar ();
51 foo (ex1);
52 return 0;