From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18435 invoked by alias); 26 Feb 2013 07:36:58 -0000 Received: (qmail 16515 invoked by uid 48); 26 Feb 2013 07:36:36 -0000 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/56450] ICE with SFINAE when detecting non-static member variable Date: Tue, 26 Feb 2013 07:36: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: jakub at gcc dot gnu.org 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: CC 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: 2013-02/txt/msg02431.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56450 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org, | |jason at gcc dot gnu.org --- Comment #1 from Jakub Jelinek 2013-02-26 07:36:33 UTC --- I think the problem is that originally decltype is used on something that looks like member access (COMPONENT_REF with IDENTIFIER_NODE as second operand), so DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P is set on it, but then, as during instantiation it is determined to be a static data member rather than member, it is changed into COMPOUND_EXPR which first evaluates the former operand of the COMPOUND_EXPR for side-effects and then has the VAR_DECL of the static data member. But for id_expression_or_member_access_p = true finish_decltype_type doesn't handle COMPOUND_EXPR.