[RFA] Fix csky and c6x build failures
[official-gcc.git] / gcc / testsuite / gcc.dg / torture / pr43000.c
blobc1123375000c7f3d438a7d59be0b6095d99beb32
1 /* { dg-do run } */
2 /* { dg-options "-fwrapv" } */
4 int __attribute__((noinline))
5 foo (long i, long j)
7 if (i >= 1)
8 if (j > -(long)(((unsigned long)(long)-1)>>1))
10 long x;
11 j--;
12 x = i + j;
13 if (x >= 0)
14 return 1;
16 return 0;
18 extern void abort (void);
19 int main()
21 if (foo (1, 1) != 1)
22 abort ();
23 return 0;