1 /* Copyright (C) 2004 Free Software Foundation.
3 Check that constant folding and RTL simplification of -(x >> y) doesn't
4 break anything and produces the expected results.
6 Written by Roger Sayle, 11th March 2004. */
8 extern void abort (void);
10 #define INT_BITS (sizeof(int)*8)
14 return -(x
>> (INT_BITS
-1));
17 int test2(unsigned int x
)
19 return -((int)(x
>> (INT_BITS
-1)));
29 int test4(unsigned int x
)
33 return -((int)(x
>> y
));
49 if (test2((unsigned int)-1) != -1)
63 if (test4((unsigned int)-1) != -1)