2 /* { dg-options "-fsanitize=signed-integer-overflow -fno-sanitize-recover=signed-integer-overflow" } */
4 __attribute__((noinline
, noclone
)) long long
5 mul (long long x
, long long y
)
11 0x7fffffffLL
, 0x7fffffffLL
, 0x3fffffff00000001LL
,
12 -0x80000000LL
, -0x80000000LL
, 0x4000000000000000LL
,
13 0x7fffffffLL
, -0x80000000LL
, -0x3fffffff80000000LL
,
14 -0x80000000LL
, 0x7fffffffLL
, -0x3fffffff80000000LL
,
19 0x1555555555555555LL
, 6LL, 0x7ffffffffffffffeLL
,
20 -0x1555555555555555LL
, -6LL, 0x7ffffffffffffffeLL
,
21 0x1555555555555555LL
, -6LL, -0x7ffffffffffffffeLL
,
22 -0x1555555555555555LL
, 6LL, -0x7ffffffffffffffeLL
,
23 0x81234567LL
, 0xfdbe971fLL
, 0x7fffffffbea72879LL
,
24 -0x81234567LL
, -0xfdbe971fLL
, 0x7fffffffbea72879LL
,
25 0x81234567LL
, -0xfdbe971fLL
, -0x7fffffffbea72879LL
,
26 -0x81234567LL
, 0xfdbe971fLL
, -0x7fffffffbea72879LL
33 for (i
= 0; i
< sizeof (tab
) / sizeof (long long); i
+= 3)
34 if (mul (tab
[i
], tab
[i
+ 1]) != tab
[i
+ 2]
35 || mul (tab
[i
+ 1], tab
[i
]) != tab
[i
+ 2])