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