Fix test to work with 16-bit targets
From-SVN: r128903
This commit is contained in:
parent
0999159b4f
commit
fe644092f5
2 changed files with 6 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2007-10-01 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* gcc.c-torture/execute/20060102-1.c (f): Fix computation to work
|
||||
for 16-bit targets.
|
||||
|
||||
2007-09-30 Diego Novillo <dnovillo@google.com>
|
||||
|
||||
PR 33593
|
||||
|
|
|
@ -2,7 +2,7 @@ extern void abort ();
|
|||
|
||||
int f(int x)
|
||||
{
|
||||
return (x >> 31) ? -1 : 1;
|
||||
return (x >> (sizeof (x) * __CHAR_BIT__ - 1)) ? -1 : 1;
|
||||
}
|
||||
|
||||
volatile int one = 1;
|
||||
|
|
Loading…
Add table
Reference in a new issue