Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr20913.c
blob3c0eceb2e1ab9f2c75b17bdd1cd2f6c3bc500fa0
1 /* PR tree-optimization/20913
2 COPY-PROP did not fold COND_EXPR, blocking some copy propagation
3 opportunities. */
5 /* { dg-do link } */
6 /* { dg-options "-O2 -fno-tree-dominator-opts" } */
8 void link_error (void);
10 int
11 foo (int a, int b, int c, int d)
13 int x, y;
15 b = a;
16 if (a == b)
17 x = c;
18 else
20 link_error ();
21 x = d;
24 if (x == c)
25 return a;
26 else
28 link_error ();
29 return b;
33 int
34 main()
36 foo (1, 2, 3, 4);