Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/c-c++-common/ubsan/pr87837.c @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | |
children |
line wrap: on
line source
/* PR sanitizer/87837 */ /* { dg-do run } */ /* { dg-options "-fsanitize=signed-integer-overflow -Wno-unused-variable" } */ int foo (int n) { return n + __INT_MAX__ < n; } int main () { volatile int a = foo (1); return 0; } /* { dg-output "signed integer overflow: 1 \\+ 2147483647 cannot be represented in type 'int'" } */