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: [PATCH, 4.7] Backport fix to [un]signed_type_for


On Thu, 10 May 2012, William J. Schmidt wrote:

> On Thu, 2012-05-10 at 18:49 +0200, Jakub Jelinek wrote:
> > On Thu, May 10, 2012 at 11:44:27AM -0500, William J. Schmidt wrote:
> > > Backporting this patch to 4.7 fixes a problem building Fedora 17.
> > > Bootstrapped and regression tested on powerpc64-unknown-linux-gnu.  Is
> > > the backport OK?
> > 
> > For 4.7 I'd very much prefer a less intrusive change (i.e. change
> > the java langhook) instead, but I'll defer to Richard if he prefers
> > this over that.
> 
> OK.  If that's desired, this is the possible change to the langhook:
> 
> Index: gcc/java/typeck.c
> ===================================================================
> --- gcc/java/typeck.c	(revision 187158)
> +++ gcc/java/typeck.c	(working copy)
> @@ -189,6 +189,12 @@ java_type_for_size (unsigned bits, int unsignedp)
>      return unsignedp ? unsigned_int_type_node : int_type_node;
>    if (bits <= TYPE_PRECISION (long_type_node))
>      return unsignedp ? unsigned_long_type_node : long_type_node;
> +  /* A 64-bit target with TImode requires 128-bit type definitions
> +     for bitsizetype.  */
> +  if (int128_integer_type_node
> +      && bits == TYPE_PRECISION (int128_integer_type_node))
> +    return (unsignedp ? int128_unsigned_type_node
> +	    : int128_integer_type_node);
>    return 0;
>  }
> 
> which also fixed the problem and bootstraps without regressions.
> Whichever you guys prefer is fine with me.

I prefer the java variant, too.

Thanks,
Richard.


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