1 /* { dg-do run } */ 2 /* { dg-options "-fwrapv" } */ 3 4 int __attribute__((noinline)) foo(long i,long j)5foo (long i, long j) 6 { 7 if (i >= 1) 8 if (j > -(long)(((unsigned long)(long)-1)>>1)) 9 { 10 long x; 11 j--; 12 x = i + j; 13 if (x >= 0) 14 return 1; 15 } 16 return 0; 17 } 18 extern void abort (void); main()19int main() 20 { 21 if (foo (1, 1) != 1) 22 abort (); 23 return 0; 24 } 25