Sync usage with man page.
[netbsd-mini2440.git] / gnu / dist / gcc4 / gcc / testsuite / gcc.dg / tree-ssa / pr22026.c
blobe56e4a124adbf0e3e236c9d374e2228e24a06497
1 /* PR tree-optimization/22026
2 VRP used think that ~[0,0] + ~[0,0] = ~[0,0], which is wrong. The
3 same applies to subtraction and unsigned multiplication. */
5 /* { dg-do compile } */
6 /* { dg-options "-O2 -fdump-tree-vrp" } */
8 int
9 plus (int x, int y)
11 if (x != 0)
12 if (y != 0)
14 int z = x + y;
15 if (z != 0)
16 return 1;
18 return 0;
21 int
22 minus (int x, int y)
24 if (x != 0)
25 if (y != 0)
27 int z = x - y;
28 if (z != 0)
29 return 1;
31 return 0;
34 int
35 mult (unsigned x, unsigned y)
37 if (x != 0)
38 if (y != 0)
40 unsigned z = x * y;
41 if (z != 0)
42 return 1;
44 return 0;
47 /* None of the predicates can be folded in these functions. */
48 /* { dg-final { scan-tree-dump-times "Folding predicate" 0 "vrp" } } */
49 /* { dg-final { cleanup-tree-dump "vrp" } } */