http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56450
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org, | |jason at gcc dot gnu.org --- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 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.