This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[commit] Fix ABI fallout (Re: wide-int, rs6000)
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: mikestump at comcast dot net (Mike Stump)
- Cc: zadeck at naturalbridge dot com (Kenneth Zadeck), gcc-patches at gcc dot gnu dot org (GCC Patches), dje dot gcc at gmail dot com (David Edelsohn)
- Date: Sat, 28 Jun 2014 12:31:31 +0200 (CEST)
- Subject: [commit] Fix ABI fallout (Re: wide-int, rs6000)
- Authentication-results: sourceware.org; auth=none
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