1 /* PR middle-end/56917 */
3 /* { dg-options "-fsanitize=undefined -fno-sanitize-recover=undefined" } */
5 #define INT_MIN (-__INT_MAX__ - 1)
6 #define LONG_MIN (-__LONG_MAX__ - 1L)
7 #define LLONG_MIN (-__LONG_LONG_MAX__ - 1LL)
9 int __attribute__ ((noinline
,noclone
))
12 return (-(int) (u
- 1U)) - 1;
15 long __attribute__ ((noinline
,noclone
))
16 fn2 (unsigned long int ul
)
18 return (-(long) (ul
- 1UL)) - 1L;
21 long long __attribute__ ((noinline
,noclone
))
22 fn3 (unsigned long long int ull
)
24 return (-(long long) (ull
- 1ULL)) - 1LL;
30 if (fn1 (__INT_MAX__
+ 1U) != INT_MIN
31 || fn2 (__LONG_MAX__
+ 1UL) != LONG_MIN
32 || fn3 (__LONG_LONG_MAX__
+ 1ULL) != LLONG_MIN
)