From fe644092f52890890262703d3de227a9fe07e257 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Mon, 1 Oct 2007 09:43:41 +0000 Subject: [PATCH] Fix test to work with 16-bit targets From-SVN: r128903 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.c-torture/execute/20060102-1.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 631e8a1ba7d..a346eb8b98b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2007-10-01 Nick Clifton + + * gcc.c-torture/execute/20060102-1.c (f): Fix computation to work + for 16-bit targets. + 2007-09-30 Diego Novillo PR 33593 diff --git a/gcc/testsuite/gcc.c-torture/execute/20060102-1.c b/gcc/testsuite/gcc.c-torture/execute/20060102-1.c index 7b616a2484f..04b6a67d928 100644 --- a/gcc/testsuite/gcc.c-torture/execute/20060102-1.c +++ b/gcc/testsuite/gcc.c-torture/execute/20060102-1.c @@ -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;