Disable gnat.dg/socket1.adb on hppa*-*-hpux*.
[official-gcc.git] / gcc / testsuite / c-c++-common / ubsan / pr82072.c
blobd5683406b141f2e3de45d1463115b3214af33c78
1 /* PR sanitizer/82072 */
2 /* { dg-do run } */
3 /* { dg-options "-fsanitize=signed-integer-overflow" } */
5 int
6 main ()
8 long long l = -__LONG_LONG_MAX__ - 1;
9 int i = 0;
10 asm volatile ("" : "+r" (i));
11 i -= l;
12 asm volatile ("" : "+r" (i));
13 i = -l;
14 asm volatile ("" : "+r" (i));
15 return 0;
18 /* { dg-output "signed integer overflow: 0 - -9223372036854775808 cannot be represented in type 'long long int'\[^\n\r]*(\n|\r\n|\r)" } */
19 /* { dg-output "\[^\n\r]*negation of -9223372036854775808 cannot be represented in type 'long long int'\[^\n\r]*; cast to an unsigned type to negate this value to itself" } */