From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26062 invoked by alias); 21 Jul 2007 09:22:18 -0000 Received: (qmail 26052 invoked by uid 22791); 21 Jul 2007 09:22:17 -0000 X-Spam-Check-By: sourceware.org Received: from pfepb.post.tele.dk (HELO pfepb.post.tele.dk) (195.41.46.236) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 21 Jul 2007 09:22:14 +0000 Received: from x1-6-00-0f-9f-c6-3e-90 (x1-6-00-0f-9f-c6-3e-90.k75.webspeed.dk [80.197.1.215]) by pfepb.post.tele.dk (Postfix) with ESMTP id 870F1A5002B; Sat, 21 Jul 2007 11:22:11 +0200 (CEST) Received: from x1-6-00-0f-9f-c6-3e-90 (localhost.localdomain [127.0.0.1]) by x1-6-00-0f-9f-c6-3e-90 (8.14.0/8.14.0) with ESMTP id l6L9Lf5V020231; Sat, 21 Jul 2007 11:21:46 +0200 Received: (from rask@localhost) by x1-6-00-0f-9f-c6-3e-90 (8.14.0/8.14.0/Submit) id l6L9L6LY020214; Sat, 21 Jul 2007 11:21:06 +0200 Date: Sat, 21 Jul 2007 10:08:00 -0000 From: Rask Ingemann Lambertsen To: Janis Johnson Cc: gcc-patches@gcc.gnu.org Subject: Re: RFA: Fixing gcc.c-torture/unsorted/dump-noaddr.c for 16-bit targets Message-ID: <20070721092054.GA5690@sygehus.dk> References: <20070528092935.GZ5690@sygehus.dk> <20070528123444.GD5690@sygehus.dk> <20070529173642.GB5168@us.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070529173642.GB5168@us.ibm.com> User-Agent: Mutt/1.5.14 (2007-02-12) 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-07/txt/msg01617.txt.bz2 On Tue, May 29, 2007 at 10:36:42AM -0700, Janis Johnson wrote: > 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 Your patch fixes it. I checked on m32c-unkonwn-elf, i686-pc-linux-gnu and x86_64-unknown-linux-gnu and it passes on all three. -- Rask Ingemann Lambertsen