Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / ssa-ccp-11.c
blob36b8e7fc8fd9be37a9d94c6a849de528772f08b0
1 /* { dg-do compile } */
2 /* { dg-options "-O1 -fdump-tree-optimized" } */
4 /* Test for CPROP across a DAG. */
6 int test111 (int param)
8 int a, b, c;
9 if (param) {
10 a = 3;
11 b = 2;
13 else {
14 a = 2;
15 b = 3;
17 c = a + b;
18 if (c != 5)
19 return 2;
20 return 0;
23 int test1111 (int param)
25 _Bool a, b, c;
26 if (param) {
27 a = 1;
28 b = 0;
30 else {
31 a = 0;
32 b = 1;
34 c = a && b;
35 if (c)
36 return 2;
37 return 0;
40 /* All ifs should be eliminated. */
41 /* { dg-final { scan-tree-dump-times "if " 0 "optimized" } } */