2 /* { dg-do compile } */
3 /* { dg-options "-O2" } */
4 /* { dg-final { scan-assembler-not {\mmul[lq]\M} } } */
12 if (__builtin_mul_overflow (x
, 2, &res
))
21 if (__builtin_mul_overflow (16, x
, &res
))
27 f3 (unsigned long long x
)
29 unsigned long long res
;
30 if (__builtin_mul_overflow (x
, (1ULL << (__SIZEOF_LONG_LONG__
* __CHAR_BIT__
- 1)), &res
))
35 #ifdef __SIZEOF_INT128__
37 f4 (unsigned __int128 x
)
39 unsigned __int128 res
;
40 if (__builtin_mul_overflow (x
, (((unsigned __int128
) 1) << (__SIZEOF_INT128__
* __CHAR_BIT__
/ 2)), &res
))
46 f5 (unsigned __int128 x
)
48 unsigned __int128 res
;
49 if (__builtin_mul_overflow (x
, (((unsigned __int128
) 1) << (__SIZEOF_INT128__
* __CHAR_BIT__
/ 2 + 3)), &res
))