This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug objc++/53441] [4.8 Regression] obj-c++.dg/ivar-invalid-type-1.mm ICE
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 21 May 2012 20:43:40 +0000
- Subject: [Bug objc++/53441] [4.8 Regression] obj-c++.dg/ivar-invalid-type-1.mm ICE
- Auto-submitted: auto-generated
- References: <bug-53441-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53441
--- Comment #1 from Uros Bizjak <ubizjak at gmail dot com> 2012-05-21 20:43:40 UTC ---
Following patch fixes the ICE:
--cut here--
Index: cp/decl.c
===================================================================
--- cp/decl.c (revision 187736)
+++ cp/decl.c (working copy)
@@ -9803,7 +9803,8 @@ grokdeclarator (const cp_declarator *declarator,
clones. */
DECL_ABSTRACT (decl) = 1;
}
- else if (constructor_name_p (unqualified_id, current_class_type))
+ else if (current_class_type
+ && constructor_name_p (unqualified_id, current_class_type))
permerror (input_location, "ISO C++ forbids nested type %qD with same
name "
"as enclosing class",
unqualified_id);
--cut here--