This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFA: Fixing gcc.c-torture/unsorted/dump-noaddr.c for 16-bit targets


On Sat, 2007-07-21 at 11:20 +0200, Rask Ingemann Lambertsen wrote:
> 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 <limits.h>
> > +
> >  #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.

This is OK for mainline.

Janis


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]