PR tree-optimization/81303
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / 20040721-1.c
blob1a6e36df8f10d24bf46ac9b2cfaa8d8cf547984b
1 /* { dg-do link } */
2 /* { dg-options "-O2" } */
4 /* Test to check whether global variables are being
5 constant propagated. */
7 extern void link_error (void);
9 int G;
11 void
12 foo (int i)
14 if (i > 0)
15 G = 3;
16 else
17 G = 3;
19 if (G != 3)
20 link_error ();
23 int
24 main ()
26 foo (0);
27 return 0;