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--

Reply via email to