1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
/* { dg-do run } */ /* { dg-options "-O2" } */ #include <limits.h> extern void abort(void); void decCompareOp (int result) { if (result != (int) (INT_MAX + 1U)) { result = -result; if (result != (int) (INT_MAX + 2U)) abort (); } } int main() { decCompareOp (INT_MAX); return 0; }