PR c++/89420 - ICE with CAST_EXPR in explicit-specifier.
authorMarek Polacek <polacek@redhat.com>
Fri, 22 Feb 2019 19:24:37 +0000 (19:24 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Fri, 22 Feb 2019 19:24:37 +0000 (19:24 +0000)
commit4770beb36c35cc8cf6be0bf061f987fb9429fa9a
tree847b766bd496cefd3030185c4117303caa676190
parentfcb141ac220aabc330dff94cb343a9a39da810c3
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.

From-SVN: r269131
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp2a/explicit14.C [new file with mode: 0644]