Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / ssa-dom-cse-3.c
blob04637c27005099d4766d8bcea356e76463f882df
1 /* { dg-do run } */
2 /* { dg-options "-O -fno-tree-fre -fdump-tree-dom2" } */
4 extern void abort (void);
6 int a;
7 int __attribute__((noinline))
8 foo (int b)
10 a = 0;
11 if (b)
13 a = 1;
14 return a;
16 /* DOM should be able to CSE both loads here, forwarding 0 and 1
17 to the PHI feeding the return. */
18 return a;
21 int
22 main()
24 if (foo (0) != 0
25 || foo (1) != 1)
26 abort ();
27 return 0;
30 /* { dg-final { scan-tree-dump "= PHI <\[01\]\\\(.\\\), \[01\]\\\(.\\\)>" "dom2" } } */