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]

[patch] Fix PR29030, fix Darwin PPC64 gcc ICE


The attached patch fixes a gcc compiler ICE at -m64 on Darwin PPC.
With the patch applied, Darwin PPC now passes gcc.dg/array-9.c
at -m64....

http://gcc.gnu.org/ml/gcc-testresults/2006-09/msg00795.html

which it previously failed...

http://gcc.gnu.org/ml/gcc-testresults/2006-09/msg00633.html

The patch has been bootstraped on powerpc-apple-darwin8 and
causes no regressions. Okay for gcc trunk?
                    Jack
ps The patch as proposed by Andrew Pinksi with the addition
of the same change to rs6000_darwin64_record_arg_recurse to
complete the fix.
------------------------------------------------------------------------


2006-09-14   Andrew Pinski  <pinskia@physics.uc.edu>
             Jack Howarth  <howarth@bromo.med.uc.edu>

	PR target/29030
	* config/rs6000/rs6000.c (rs6000_darwin64_record_arg_advance_recurse)
        skip on error_mark_node.
        (rs6000_darwin64_record_arg_recurse): Likewise.

Index: gcc/config/rs6000/rs6000.c
===================================================================
--- gcc/config/rs6000/rs6000.c	(revision 116941)
+++ gcc/config/rs6000/rs6000.c	(working copy)
@@ -4607,7 +4607,10 @@ rs6000_darwin64_record_arg_advance_recur
       {
 	HOST_WIDE_INT bitpos = startbitpos;
 	tree ftype = TREE_TYPE (f);
-	enum machine_mode mode = TYPE_MODE (ftype);
+	enum machine_mode mode;
+	if (ftype == error_mark_node)
+	  continue;
+	mode = TYPE_MODE (ftype);
 
 	if (DECL_SIZE (f) != 0
 	    && host_integerp (bit_position (f), 1))
@@ -4975,7 +4978,10 @@ rs6000_darwin64_record_arg_recurse (CUMU
       {
 	HOST_WIDE_INT bitpos = startbitpos;
 	tree ftype = TREE_TYPE (f);
-	enum machine_mode mode = TYPE_MODE (ftype);
+	enum machine_mode mode;
+	if (ftype == error_mark_node)
+	  continue;
+	mode = TYPE_MODE (ftype);
 
 	if (DECL_SIZE (f) != 0
 	    && host_integerp (bit_position (f), 1))


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