2 /* { dg-options "-fsanitize=signed-integer-overflow" } */
4 __attribute__((noinline
, noclone
)) int
10 __attribute__((noinline
, noclone
)) int
13 unsigned int xa
= (unsigned int) x
- (__INT_MAX__
- 3);
15 x
= __INT_MAX__
- 3 + xa
;
16 unsigned int ya
= y
+ 1U;
26 for (xm1
= __INT_MAX__
- 4; xm1
< __INT_MAX__
; xm1
++)
27 for (y
= -1; y
<= 0; y
++)
28 if (foo1 (xm1
+ 1, y
) != (int) (xm1
+ 1U - y
)
29 || foo2 (xm1
+ 1, y
) != (int) (xm1
+ 1U - y
))
33 /* { dg-output ":7:\[0-9]\[^\n\r]*signed integer overflow: 2147483647 - -1 cannot be represented in type 'int'\[^\n\r]*(\n|\r\n|\r)" } */
34 /* { dg-output "\[^\n\r]*:19:\[0-9]\[^\n\r]*signed integer overflow: 2147483647 - -1 cannot be represented in type 'int'" } */