1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-optimized" } */
3 
4 int
min1(signed char op1,signed char op2)5 min1 (signed char op1, signed char op2)
6 {
7   return (op1 < 25) ? (int)op1 : 24;
8 }
9 int
min2(signed char op1,signed char op2)10 min2 (signed char op1, signed char op2)
11 {
12   return (op1 <= 24) ? (int)op1 : 25;
13 }
14 int
min3(unsigned char op1,unsigned char op2)15 min3 (unsigned char op1, unsigned char op2)
16 {
17   return (op1 < 25) ? (unsigned int)op1 : 24;
18 }
19 int
min4(unsigned char op1,unsigned char op2)20 min4 (unsigned char op1, unsigned char op2)
21 {
22   return (op1 <= 24) ? (unsigned int)op1 : 25;
23 }
24 int
max1(signed char op1,signed char op2)25 max1 (signed char op1, signed char op2)
26 {
27   return (op1 > 24) ? (int)op1 : 25;
28 }
29 int
max2(signed char op1,signed char op2)30 max2 (signed char op1, signed char op2)
31 {
32   return (op1 >= 25) ? (int)op1 : 24;
33 }
34 int
max3(unsigned char op1,unsigned char op2)35 max3 (unsigned char op1, unsigned char op2)
36 {
37   return (op1 > 24) ? (unsigned int)op1 : 25;
38 }
39 int
max4(unsigned char op1,unsigned char op2)40 max4 (unsigned char op1, unsigned char op2)
41 {
42   return (op1 >= 25) ? (unsigned int)op1 : 24;
43 }
44 
45 /* { dg-final { scan-tree-dump-times "MIN_EXPR" 4 "optimized" } } */
46 /* { dg-final { scan-tree-dump-times "MAX_EXPR" 4 "optimized" } } */
47 
48