Debian Codegraph @

gcc/testsuite/c-c++-common/ubsan/pr56956.c

raw
1 /* { dg-do run } */
2 /* { dg-options "-fsanitize=undefined -fsanitize-trap=undefined" } */
3
4 unsigned int __attribute__((noinline,noclone))
5 foo (unsigned int x)
6 {
7 return x <= __INT_MAX__ ? x : -x;
8 }
9
10 int
11 main ()
12 {
13 volatile unsigned int tem = foo (-__INT_MAX__ - 1);
14 return 0;
15 }