]> gcc.gnu.org Git - gcc.git/blob - gcc/testsuite/c-c++-common/ubsan/overflow-add-4.c
Merge branch 'master' into devel/modula-2.
[gcc.git] / gcc / testsuite / c-c++-common / ubsan / overflow-add-4.c
1 /* { dg-do run } */
2 /* { dg-options "-fsanitize=signed-integer-overflow -Wno-unused-variable -fsanitize-trap=undefined" } */
3 /* { dg-shouldfail "ubsan" } */
4
5 #define INT_MAX __INT_MAX__
6 #define INT_MIN (-__INT_MAX__ - 1)
7
8 int
9 main (void)
10 {
11 volatile int j = INT_MAX;
12 volatile int i = 1;
13 volatile int k = j + i;
14 return 0;
15 }
This page took 0.036023 seconds and 5 git commands to generate.