http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48574
--- Comment #15 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-05-04 10:54:48 UTC --- Indeed, unlike the reduced testcase, for the original one it triggers during fold_non_dependent_expr_sfinae which means that processing_template_decl is 0 and thus type_dependent_expression_p check Dodji added returns false immediately. Related to PR48749, where processing_template_decl is 1, but type_dependent_expression_p is still false, because the COMPONENT_REF has non-dependent type, yet its operands are dependent (it was created using build_min_non_dep).