From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2489 invoked by alias); 21 May 2012 20:57:44 -0000 Received: (qmail 2474 invoked by uid 22791); 21 May 2012 20:57:44 -0000 X-SWARE-Spam-Status: No, hits=-4.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KHOP_THREADED,TW_ZJ X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 21 May 2012 20:57:31 +0000 From: "ubizjak at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug objc++/53441] [4.8 Regression] obj-c++.dg/ivar-invalid-type-1.mm ICE Date: Mon, 21 May 2012 20:59:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: objc++ X-Bugzilla-Keywords: ice-checking, ice-on-invalid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: ubizjak at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-05/txt/msg02073.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53441 --- Comment #1 from Uros Bizjak 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--