https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89420
--- Comment #4 from Marek Polacek <mpolacek at gcc dot gnu.org> --- Author: mpolacek Date: Fri Feb 22 19:24:37 2019 New Revision: 269131 URL: https://gcc.gnu.org/viewcvs?rev=269131&root=gcc&view=rev Log: PR c++/89420 - ICE with CAST_EXPR in explicit-specifier. * decl.c (build_explicit_specifier): Don't check processing_template_decl. Call instantiation_dependent_expression_p instead of value_dependent_expression_p. Call instantiate_non_dependent_expr_sfinae before build_converted_constant_expr instead of calling instantiate_non_dependent_expr after it. Add processing_template_decl_sentinel. * g++.dg/cpp2a/explicit14.C: New test. Added: trunk/gcc/testsuite/g++.dg/cpp2a/explicit14.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/decl.c trunk/gcc/testsuite/ChangeLog