Debian Codegraph @

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

raw
1 /* PR sanitizer/60636 */
2 /* { dg-do run } */
3 /* { dg-options "-fsanitize=undefined" } */
4
5 volatile long long int a;
6
7 int
8 main ()
9 {
10 long long int u = -__LONG_LONG_MAX__ - 1;
11 a = u > 0 ? u : -u;
12 return 0;
13 }
14
15 /* { dg-output "negation of -9223372036854775808 cannot be represented in type 'long long int'" } */