1 /*
2    20060102-1.c from the execute part of the gcc torture suite.
3  */
4 
5 #include <testfwk.h>
6 
7 #ifdef __SDCC
8 #pragma std_c99
9 #endif
10 
11 #include <limits.h>
12 
f(int x)13 int f(int x)
14 {
15   return (x >> (sizeof (x) * CHAR_BIT - 1)) ? -1 : 1;
16 }
17 
18 volatile int one = 1;
testTortureExecute(void)19 void testTortureExecute (void)
20 {
21   /* Test that the function above returns different values for
22      different signs.  */
23   if (f(one) == f(-one))
24     ASSERT (0);
25   return;
26 }
27 
28