PR tree-optimization/83369 - Missing diagnostics during inlining
[official-gcc.git] / gcc / testsuite / gcc.dg / pr82274-2.c
bloba9643b5a923d454a2c7b224f351a208fde3bd802
1 /* PR target/82274 */
2 /* { dg-do run } */
3 /* { dg-options "-O2" } */
5 int
6 main ()
8 #ifdef __SIZEOF_INT128__
9 __int128 m = -(((__int128) 1) << (__CHAR_BIT__ * __SIZEOF_INT128__ / 2));
10 volatile __int128 mv = m;
11 __int128 r;
12 #else
13 long long m = -(1LL << (__CHAR_BIT__ * __SIZEOF_LONG_LONG__ / 2));
14 volatile long long mv = m;
15 long long r;
16 #endif
17 if (!__builtin_mul_overflow (mv, mv, &r))
18 __builtin_abort ();
19 if (!__builtin_mul_overflow_p (mv, mv, r))
20 __builtin_abort ();
21 if (!__builtin_mul_overflow (m, m, &r))
22 __builtin_abort ();
23 if (!__builtin_mul_overflow_p (m, m, r))
24 __builtin_abort ();
25 return 0;