PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / compare-2.c
blob858df294ecaf9a264e451bb25fef98071cbbe210
1 /* Copyright (C) 2002 Free Software Foundation.
3 Ensure that the composite comparison optimization doesn't misfire
4 and attempt to combine a signed comparison with an unsigned one.
6 Written by Roger Sayle, 3rd June 2002. */
8 extern void abort (void);
10 int
11 foo (int x, int y)
13 /* If miscompiled the following may become "x == y". */
14 return (x<=y) && ((unsigned int)x >= (unsigned int)y);
17 int
18 main ()
20 if (! foo (-1,0))
21 abort ();
22 return 0;