From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 123865 invoked by alias); 10 Mar 2015 16:47:21 -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 123776 invoked by uid 48); 10 Mar 2015 16:47:18 -0000 From: "jason at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/65127] [5 Regression] internal compiler error: tree check: expected tree that contains 'decl minimal' structure, have 'addr_expr' in parsing_nsdmi, at cp/parser.c:18311 Date: Tue, 10 Mar 2015 16:47: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-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jason 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: 5.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-03/txt/msg01147.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65127 --- Comment #5 from Jason Merrill --- (In reply to Jakub Jelinek from comment #3) > So it seems current_class_ptr is no longer just NULL or a PARM_DECL, but can > be also ADDR_EXPR of a PLACEHOLDER_EXPR. Dunno if the right fix is > just > bool > parsing_nsdmi (void) > { > /* We recognize NSDMI context by the context-less 'this' pointer set up > by the function above. */ > - if (current_class_ptr && DECL_CONTEXT (current_class_ptr) == NULL_TREE) > + if (current_class_ptr > + && TREE_CODE (current_class_ptr) == PARM_DECL > + && DECL_CONTEXT (current_class_ptr) == NULL_TREE) > return true; > return false; > } > or something different. This change is OK.