This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/19030] [4.0 Regression] ice on tree check
- From: "reichelt at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Dec 2004 17:12:40 -0000
- Subject: [Bug c++/19030] [4.0 Regression] ice on tree check
- References: <20041216090722.19030.pluto@pld-linux.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From reichelt at gcc dot gnu dot org 2004-12-17 17:12 -------
Hi Nathan, the following patch fixes the ICE for me:
Index: gcc/gcc/cp/name-lookup.c
===================================================================
RCS file: /home/reichelt/GCC/CVS/gcc-cvs/gcc/gcc/cp/name-lookup.c,v
retrieving revision 1.101
diff -u -p -r1.101 name-lookup.c
--- gcc/gcc/cp/name-lookup.c 9 Dec 2004 21:06:59 -0000 1.101
+++ gcc/gcc/cp/name-lookup.c 17 Dec 2004 16:46:40 -0000
@@ -4663,7 +4663,12 @@ pushtag (tree name, tree type, int globa
pushdecl_class_level (d);
}
else
- d = pushdecl_with_scope (d, b);
+ {
+ d = pushdecl_with_scope (d, b);
+
+ if (d == error_mark_node)
+ return error_mark_node;
+ }
/* FIXME what if it gets a name from typedef? */
if (ANON_AGGRNAME_P (name))
===================================================================
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19030