From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22128 invoked by alias); 29 May 2007 17:36:48 -0000 Received: (qmail 22119 invoked by uid 22791); 29 May 2007 17:36:48 -0000 X-Spam-Check-By: sourceware.org Received: from e2.ny.us.ibm.com (HELO e2.ny.us.ibm.com) (32.97.182.142) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 29 May 2007 17:36:46 +0000 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by e2.ny.us.ibm.com (8.13.8/8.13.8) with ESMTP id l4THaioc027347 for ; Tue, 29 May 2007 13:36:44 -0400 Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v8.3) with ESMTP id l4THaiuE525200 for ; Tue, 29 May 2007 13:36:44 -0400 Received: from d01av02.pok.ibm.com (loopback [127.0.0.1]) by d01av02.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id l4THaiTD023555 for ; Tue, 29 May 2007 13:36:44 -0400 Received: from dyn9047018100.beaverton.ibm.com (dyn9047018100.beaverton.ibm.com [9.47.18.100]) by d01av02.pok.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id l4THahqN023499 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 29 May 2007 13:36:44 -0400 Received: from dyn9047018100.beaverton.ibm.com (localhost.localdomain [127.0.0.1]) by dyn9047018100.beaverton.ibm.com (8.12.8/8.12.8) with ESMTP id l4THagn2005372; Tue, 29 May 2007 10:36:42 -0700 Received: (from janis@localhost) by dyn9047018100.beaverton.ibm.com (8.12.8/8.12.8/Submit) id l4THagKJ005370; Tue, 29 May 2007 10:36:42 -0700 Date: Tue, 29 May 2007 17:41:00 -0000 From: Janis Johnson To: Rask Ingemann Lambertsen Cc: gcc-patches@gcc.gnu.org Subject: Re: RFA: Fixing gcc.c-torture/unsorted/dump-noaddr.c for 16-bit targets Message-ID: <20070529173642.GB5168@us.ibm.com> References: <20070528092935.GZ5690@sygehus.dk> <20070528123444.GD5690@sygehus.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070528123444.GD5690@sygehus.dk> User-Agent: Mutt/1.4.1i X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2007-05/txt/msg02017.txt.bz2 On Mon, May 28, 2007 at 02:34:44PM +0200, Rask Ingemann Lambertsen wrote: > On Mon, May 28, 2007 at 11:29:35AM +0200, Rask Ingemann Lambertsen wrote: > > This test generates around 300 bogus failures on 16-bit targets. The > > attached patch, tested on m32-unknown-elf, i686-pc-linux-gnu and > > mipsisa64-unknown-elf, reduces the length of the string enought to make the > > tests pass on 16-bit targets, but I'd prefer a way which keeps the original > > string length on targets where it ought to work. Any ideas? > > We have effective_target_int32plus and effective_target_int16. I'll > submit a patch based on that. Or you could check the value of INT_MAX: --- dump-noaddr.c.orig 2007-05-29 10:29:08.992247040 -0700 +++ dump-noaddr.c 2007-05-29 10:28:08.908194752 -0700 @@ -1,10 +1,21 @@ +#include + #if MASK & 1 +#define t11(x) x x x x x x x x x x x #define t16(x) x x x x x x x x x x x x x x x x +#if INT_MAX < 2147483647 +#define M (sizeof (t11(t11(t16(t16(" "))))) - 1) +#else #define M (sizeof (t16(t16(t16(t16(t16(" ")))))) - 1) #endif +#endif #if MASK & 2 +#if INT_MAX < 2147483647 +#define M 30976 +#else #define M 1048576 #endif +#endif typedef struct s { int c; Janis