From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3628 invoked by alias); 23 Apr 2013 10:06:40 -0000 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 Received: (qmail 3583 invoked by uid 48); 23 Apr 2013 10:06:38 -0000 From: "mpolacek at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/57041] [4.7/4.8/4.9 Regression] ICE in lookup_field_1, at cp/search.c:376 (with dot-prefixed structure initialisation) Date: Tue, 23 Apr 2013 10:06:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mpolacek at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.9.0 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 X-SW-Source: 2013-04/txt/msg01931.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57041 --- Comment #3 from Marek Polacek 2013-04-23 10:06:37 UTC --- lookup_field_1 instead of IDENTIFIER_NODE gets the error_mark_node, and the following assert chokes on it: gcc_assert (identifier_p (name)); It seems that if we just return NULL_TREE in that case, everything is fine. --- a/gcc/cp/search.c +++ b/gcc/cp/search.c @@ -381,7 +381,7 @@ lookup_field_1 (tree type, tree name, bool want_type) { tree field; - gcc_assert (identifier_p (name)); + gcc_assert (identifier_p (name) || name == error_mark_node); if (TREE_CODE (type) == TEMPLATE_TYPE_PARM || TREE_CODE (type) == BOUND_TEMPLATE_TEMPLATE_PARM