Small ChangeLog tweak.
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / pr45262.c
blob45cc8de3c59a2a05aacf70bdce7e0581d800d2d6
1 /* PR middle-end/45262 */
3 /* { dg-require-effective-target int32plus } */
5 extern void abort (void);
7 int
8 foo (unsigned int x)
10 return ((int) x < 0) || ((int) (-x) < 0);
13 int
14 bar (unsigned int x)
16 return x >> 31 || (-x) >> 31;
19 int
20 main (void)
22 if (foo (1) != 1)
23 abort ();
24 if (foo (0) != 0)
25 abort ();
26 if (foo (-1) != 1)
27 abort ();
28 if (bar (1) != 1)
29 abort ();
30 if (bar (0) != 0)
31 abort ();
32 if (bar (-1) != 1)
33 abort ();
34 return 0;