1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-optimized" } */
5 min1 (signed char op1
, signed char op2
)
7 return (op1
< 25) ? (int)op1
: 24;
10 min2 (signed char op1
, signed char op2
)
12 return (op1
<= 24) ? (int)op1
: 25;
15 min3 (unsigned char op1
, unsigned char op2
)
17 return (op1
< 25) ? (unsigned int)op1
: 24;
20 min4 (unsigned char op1
, unsigned char op2
)
22 return (op1
<= 24) ? (unsigned int)op1
: 25;
25 max1 (signed char op1
, signed char op2
)
27 return (op1
> 24) ? (int)op1
: 25;
30 max2 (signed char op1
, signed char op2
)
32 return (op1
>= 25) ? (int)op1
: 24;
35 max3 (unsigned char op1
, unsigned char op2
)
37 return (op1
> 24) ? (unsigned int)op1
: 25;
40 max4 (unsigned char op1
, unsigned char op2
)
42 return (op1
>= 25) ? (unsigned int)op1
: 24;
45 /* { dg-final { scan-tree-dump-times "MIN_EXPR" 4 "optimized" } } */
46 /* { dg-final { scan-tree-dump-times "MAX_EXPR" 4 "optimized" } } */