diff mbox

[commit] Fix ABI fallout (Re: wide-int, rs6000)

Message ID 201406281031.s5SAVW8T014778@d06av02.portsmouth.uk.ibm.com
State New
Headers show

Commit Message

Ulrich Weigand June 28, 2014, 10:31 a.m. UTC
Mike Stump wrote:

> 	(rs6000_aggregate_candidate): Use wide-int interfaces.
[snip]
> -	/* Can't handle incomplete types.  */
> -	if (!COMPLETE_TYPE_P (type))
> -	  return -1;
> +	/* Can't handle incomplete types nor sizes that are not
> +	   fixed.  */
> +	if (!COMPLETE_TYPE_P (type)
> +	    || TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST)
> 

This patch introduced an accidental change: the "return -1;" line was
deleted.  This influences certain ABI decisions, e.g. whether a union
of two vector types is supposed to be passed in a VR or in GPRs.
(Noticed by running the ABI compatibility test suite.)

Fortunately, this bug never made it into any (FSF or distribtion)
GCC release, so we can simply fix it now without introducing any
incompatibilities ...

I've checked in the following patch as obvious.

Bye,
Ulrich


ChangeLog:

2014-06-28  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>

	* config/rs6000/rs6000.c (rs6000_aggregate_candidate): Revert
	accidental change due to wide-int branch merge.

Comments

Mike Stump June 28, 2014, 7:18 p.m. UTC | #1
On Jun 28, 2014, at 3:31 AM, Ulrich Weigand <uweigand@de.ibm.com> wrote:
> Mike Stump wrote:
> 
>> 	(rs6000_aggregate_candidate): Use wide-int interfaces.
> [snip]
>> -	/* Can't handle incomplete types.  */
>> -	if (!COMPLETE_TYPE_P (type))
>> -	  return -1;
>> +	/* Can't handle incomplete types nor sizes that are not
>> +	   fixed.  */
>> +	if (!COMPLETE_TYPE_P (type)
>> +	    || TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST)

Ouch, sorry.  At least 8 eyes missed it.  Does this fix the -m32 issue?

> I've checked in the following patch as obvious.

Thanks.
diff mbox

Patch

Index: gcc/config/rs6000/rs6000.c
===================================================================
--- gcc/config/rs6000/rs6000.c	(revision 212069)
+++ gcc/config/rs6000/rs6000.c	(working copy)
@@ -8766,6 +8766,7 @@ 
 	   fixed.  */
 	if (!COMPLETE_TYPE_P (type)
 	    || TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST)
+	  return -1;
 
 	for (field = TYPE_FIELDS (type); field; field = TREE_CHAIN (field))
 	  {