Mercurial > hg > CbC > CbC_gcc
diff gcc/testsuite/c-c++-common/torture/builtin-arith-overflow-11.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gcc/testsuite/c-c++-common/torture/builtin-arith-overflow-11.c Fri Oct 27 22:46:09 2017 +0900 @@ -0,0 +1,17 @@ +/* Test __builtin_{add,sub}_overflow on {,un}signed long long int. */ +/* { dg-do run } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */ + +typedef signed long long int S; +typedef unsigned long long int U; +#define COND 1 +#define SHIFT ((__SIZEOF_LONG_LONG__ - 1) * __CHAR_BIT__) +#define S_MAX __LONG_LONG_MAX__ +#define S_MIN (-__LONG_LONG_MAX__ - 1) +#if __SIZEOF_INT128__ > __SIZEOF_LONG_LONG__ +typedef __int128 W; +#else +#undef COND +#define COND 0 +#endif +#include "builtin-arith-overflow-7.c"