2 990211-1.c from the execute part of the gcc torture suite.
11 /* Copyright (C) 1999 Free Software Foundation, Inc.
12 Contributed by Nathan Sidwell 20 Jan 1999 <nathan@acm.org> */
14 /* check range combining boolean operations work */
20 /* fold-const does some clever things with range tests. Make sure
21 we get (some of) them right */
23 /* these must fail, regardless of the value of i */
24 if ((i
< 0) && (i
>= 0))
26 if ((i
> 0) && (i
<= 0))
28 if ((i
>= 0) && (i
< 0))
30 if ((i
<= 0) && (i
> 0))
33 if ((i
< N
) && (i
>= N
))
35 if ((i
> N
) && (i
<= N
))
37 if ((i
>= N
) && (i
< N
))
39 if ((i
<= N
) && (i
> N
))
42 /* these must pass, regardless of the value of i */
43 if (! ((i
< 0) || (i
>= 0)))
45 if (! ((i
> 0) || (i
<= 0)))
47 if (! ((i
>= 0) || (i
< 0)))
49 if (! ((i
<= 0) || (i
> 0)))
52 if (! ((i
< N
) || (i
>= N
)))
54 if (! ((i
> N
) || (i
<= N
)))
56 if (! ((i
>= N
) || (i
< N
)))
58 if (! ((i
<= N
) || (i
> N
)))
65 testTortureExecute (void)