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]

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


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.

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))
 	  {

-- 
  Dr. Ulrich Weigand
  GNU/Linux compilers and toolchain
  Ulrich.Weigand@de.ibm.com


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