This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] Fix PR29030, fix Darwin PPC64 gcc ICE
- From: howarth at bromo dot msbb dot uc dot edu (Jack Howarth)
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 15 Sep 2006 18:26:51 -0400 (EDT)
- Subject: [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))