diff mbox

[PR,66854,powerpc,regression] Fix RTEMS powerpc build issue

Message ID 20150715000947.GA4221@ibm-tiger.the-meissners.org
State New
Headers show

Commit Message

Michael Meissner July 15, 2015, 12:09 a.m. UTC
My IEEE 128-bit floating point infrastructure patches resulted in a
segmentation violation on RTEMS when building libgcc.  I had put a test using a
type tree variable before the test whether it was NULL or not.

This patch bootstraps on 64-bit Linux, and it also fixes the problem in
question when building a RTEMS compiler.  Can this patch be installed if it
causes no further regressions for RTEMS?

2015-07-14  Michael Meissner  <meissner@linux.vnet.ibm.com>

	PR target/66854
	* config/rs6000/rs6000.c (rs6000_pass_by_reference): Move test for
	null before IEEE 128-bit floating point support patch.

Comments

David Edelsohn July 15, 2015, 3:01 a.m. UTC | #1
On Tue, Jul 14, 2015 at 8:09 PM, Michael Meissner
<meissner@linux.vnet.ibm.com> wrote:
> My IEEE 128-bit floating point infrastructure patches resulted in a
> segmentation violation on RTEMS when building libgcc.  I had put a test using a
> type tree variable before the test whether it was NULL or not.
>
> This patch bootstraps on 64-bit Linux, and it also fixes the problem in
> question when building a RTEMS compiler.  Can this patch be installed if it
> causes no further regressions for RTEMS?
>
> 2015-07-14  Michael Meissner  <meissner@linux.vnet.ibm.com>
>
>         PR target/66854
>         * config/rs6000/rs6000.c (rs6000_pass_by_reference): Move test for
>         null before IEEE 128-bit floating point support patch.

Okay.

Thanks, David
diff mbox

Patch

Index: gcc/config/rs6000/rs6000.c
===================================================================
--- gcc/config/rs6000/rs6000.c	(revision 225780)
+++ gcc/config/rs6000/rs6000.c	(working copy)
@@ -10832,6 +10832,9 @@ 
 			  machine_mode mode, const_tree type,
 			  bool named ATTRIBUTE_UNUSED)
 {
+  if (!type)
+    return 0;
+
   if (DEFAULT_ABI == ABI_V4 && TARGET_IEEEQUAD
       && FLOAT128_IEEE_P (TYPE_MODE (type)))
     {
@@ -10840,9 +10843,6 @@ 
       return 1;
     }
 
-  if (!type)
-    return 0;
-
   if (DEFAULT_ABI == ABI_V4 && AGGREGATE_TYPE_P (type))
     {
       if (TARGET_DEBUG_ARG)