2 20040311-1.c from the execute part of the gcc torture suite.
11 /* Copyright (C) 2004 Free Software Foundation.
13 Check that constant folding and RTL simplification of -(x >> y) doesn't
14 break anything and produces the expected results.
16 Written by Roger Sayle, 11th March 2004. */
18 #define INT_BITS (sizeof(int)*8)
22 return -(x
>> (INT_BITS
-1));
25 int ftest2(unsigned int x
)
27 return -((int)(x
>> (INT_BITS
-1)));
37 int ftest4(unsigned int x
)
41 return -((int)(x
>> y
));
45 testTortureExecute (void)
58 if (ftest2((unsigned int)-1) != -1)
72 if (ftest4((unsigned int)-1) != -1)