c++: Fix ICE with #embed/RAW_DATA_CST after list conversion [PR118671]
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / cmpbit-2.c
blobc4226ef01afb7c24e8a3f5eee32c4e3ba84bf51c
1 /* { dg-do compile } */
2 /* { dg-options "-O1 -fno-tree-reassoc -fdump-tree-optimized-raw" } */
4 _Bool f(int a, int b)
6 _Bool c = a == b;
7 _Bool d = a > b;
8 return c | d;
11 _Bool f1(int a, int b)
13 _Bool c = a != b;
14 _Bool d = a >= b;
15 return c & d;
18 _Bool g(int a, int b)
20 _Bool c = a == b;
21 _Bool d = a < b;
22 return c | d;
25 _Bool g1(int a, int b)
27 _Bool c = a != b;
28 _Bool d = a <= b;
29 return c & d;
33 /* We should be able to optimize these without reassociation too. */
34 /* { dg-final { scan-tree-dump-not "bit_and_expr," "optimized" } } */
35 /* { dg-final { scan-tree-dump-not "bit_ior_expr," "optimized" } } */
36 /* { dg-final { scan-tree-dump-times "gt_expr," 1 "optimized" } } */
37 /* { dg-final { scan-tree-dump-times "ge_expr," 1 "optimized" } } */
38 /* { dg-final { scan-tree-dump-times "lt_expr," 1 "optimized" } } */
39 /* { dg-final { scan-tree-dump-times "le_expr," 1 "optimized" } } */