1 /* PR tree-optimization/66187 */
3 /* { dg-options "-O2 -fwrapv" } */
5 __attribute__((noinline
, noclone
)) int
6 f0 (unsigned char x
, unsigned char y
)
8 return (x
+ y
) & 0x2ff;
11 __attribute__((noinline
, noclone
)) int
12 f1 (unsigned char x
, unsigned char y
)
14 return (x
- y
) & 0x2ff;
17 __attribute__((noinline
, noclone
)) int
18 f2 (signed char x
, signed char y
)
23 __attribute__((noinline
, noclone
)) int
24 f3 (signed char x
, signed char y
)
26 return (x
+ y
) & 0xf8;
29 __attribute__((noinline
, noclone
)) int
30 f4 (signed char x
, signed char y
)
32 return (x
+ y
) & 0x78;
35 __attribute__((noinline
, noclone
)) int
36 f5 (unsigned char x
, unsigned char y
)
44 __attribute__((noinline
, noclone
)) int
45 f6 (unsigned char x
, unsigned char y
)
53 __attribute__((noinline
, noclone
)) int
54 f7 (signed char x
, signed char y
)
62 __attribute__((noinline
, noclone
)) int
63 f8 (signed char x
, signed char y
)
71 __attribute__((noinline
, noclone
)) int
72 f9 (signed char x
, signed char y
)
83 if (__SCHAR_MAX__
!= 127 || sizeof (int) != 4)
85 if (f0 (0xff, 0xff) != 0xfe
90 || f5 (0xff, 0xff) != 0xfe
94 || f9 (-2, 1) != 0x78)