1/* { dg-do run } */ 2/* { dg-options "-fsanitize=signed-integer-overflow" } */ 3 4#define INT_MIN (-__INT_MAX__ - 1) 5 6int 7main () 8{ 9 int x = INT_MIN; 10 int y = 0; 11 int z; 12 asm ("" : "+g" (y)); 13 asm ("" : "+g" (x)); 14 z = y - (-x); 15 asm ("" : "+g" (z)); 16} 17 18/* { dg-output "negation of -2147483648 cannot be represented in type 'int'\[^\n\r]*; cast to an unsigned type to negate this value to itself\[^\n\r]*(\n|\r\n|\r)" } */ 19/* { dg-output "\[^\n\r]*signed integer overflow: 0 - -2147483648 cannot be represented in type 'int'\[^\n\r]*(\n|\r\n|\r)" } */ 20