c++: Fix ICE with #embed/RAW_DATA_CST after list conversion [PR118671]
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr103660-0.c
blob6be0721aeddb8fe349bdf26b1fcae60c3af4084e
1 /* PR tree-optimization/103660 */
2 /* { dg-do compile } */
3 /* { dg-options "-O1 -fdump-tree-forwprop4-raw" } */
5 #define funcs(OP,n) \
6 int min_##n(int a, int b) { \
7 int t; \
8 int t1; \
9 int t2; \
10 t1 = (a < b) * a; \
11 t2 = (a >= b) * b; \
12 t = t1 OP t2; \
13 return t; \
14 } \
15 int f_##n(int a, int b, int c, \
16 int d) { \
17 int t; \
18 int t1; \
19 int t2; \
20 t1 = (a < b) * c; \
21 t2 = (a >= b) * d; \
22 t = t1 OP t2; \
23 return t; \
26 funcs(|, ior)
28 /* min_ior should produce min<a,b> */
29 /* f_ior should produce (a < b) ? c : d */
30 /* { dg-final { scan-tree-dump-not "bit_ior_expr, " "forwprop4" } } */
31 /* { dg-final { scan-tree-dump-times "min_expr, " 1 "forwprop4" } } */
32 /* { dg-final { scan-tree-dump-times "lt_expr, " 1 "forwprop4" } } */
33 /* { dg-final { scan-tree-dump-times "cond_expr, " 1 "forwprop4" } } */