PR rtl-optimization/88018
[official-gcc.git] / gcc / testsuite / c-c++-common / torture / builtin-arith-overflow-p-17.c
blob18721d3fbfcc96fe919eac2fe7c979aa16114a19
1 /* Test __builtin_{add,sub,mul}_overflow_p. */
2 /* { dg-do run { target int128 } } */
3 /* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */
5 #define OVFP
6 #include "builtin-arith-overflow-12.h"
8 #define INT128_MAX ((signed __int128) (((unsigned __int128) 1 << (__SIZEOF_INT128__ * __CHAR_BIT__ - 1)) - 1))
9 #define INT128_MIN (-INT128_MAX - 1)
11 TESTS (__int128, INT128_MIN, INT128_MAX)
13 #undef T
14 #define T(n, t1, t2, tr, v1, v2, vr, b, o) t##n##b ();
16 int
17 main ()
19 TESTS (__int128, INT128_MIN, INT128_MAX)
20 return 0;