1 /* { dg-do compile } */
2 /* { dg-options "-O1 -fdump-tree-optimized --param logical-op-non-short-circuit=1" } */
3
f(int a,int b,int c)4 int f(int a, int b, int c)
5 {
6 if (a == 0 && b > c)
7 return 0;
8 return a;
9 }
10
g(int a,int b,int c)11 int g(int a, int b, int c)
12 {
13 if (a == 42 && b > c)
14 return 42;
15 return a;
16 }
17
h(int a,int b,int c,int d)18 int h(int a, int b, int c, int d)
19 {
20 if (a == d && b > c)
21 return d;
22 return a;
23 }
24
25 /* { dg-final { scan-tree-dump-times "if" 0 "optimized" } } */
26