1 /* Test __builtin_{add,sub}_overflow_p on {,un}signed short. */
3 /* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */
5 typedef signed short int S
;
6 typedef unsigned short int U
;
8 #define SHIFT ((__SIZEOF_SHORT__ - 1) * __CHAR_BIT__)
9 #define S_MAX __SHRT_MAX__
10 #define S_MIN (-__SHRT_MAX__ - 1)
11 #if __SIZEOF_INT__ > __SIZEOF_SHORT__
13 #elif __SIZEOF_LONG__ > __SIZEOF_SHORT__
15 #elif __SIZEOF_LONG_LONG__ > __SIZEOF_SHORT__
16 typedef long long int W
;
17 #elif __SIZEOF_INT128__ > __SIZEOF_SHORT__
23 #include "builtin-arith-overflow-p-7.c"