+2019-02-22 Marek Polacek <polacek@redhat.com>
+
+ 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.
+
2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
* parser.c (cp_parser_oacc_simple_clause): Remove parser formal
tree
build_explicit_specifier (tree expr, tsubst_flags_t complain)
{
- if (processing_template_decl && value_dependent_expression_p (expr))
+ if (instantiation_dependent_expression_p (expr))
/* Wait for instantiation, tsubst_function_decl will handle it. */
return expr;
+ expr = instantiate_non_dependent_expr_sfinae (expr, complain);
+ /* Don't let convert_like_real create more template codes. */
+ processing_template_decl_sentinel s;
expr = build_converted_constant_expr (boolean_type_node, expr, complain);
- expr = instantiate_non_dependent_expr (expr);
expr = cxx_constant_value (expr);
return expr;
}
+2019-02-22 Marek Polacek <polacek@redhat.com>
+
+ PR c++/89420 - ICE with CAST_EXPR in explicit-specifier.
+ * g++.dg/cpp2a/explicit14.C: New test.
+
2019-02-22 Matthew Malcomson <matthew.malcomson@arm.com>
PR target/89324
--- /dev/null
+// PR c++/89420
+// { dg-do compile { target c++2a } }
+
+template<typename>
+struct S {
+ explicit(int(1)) S(int);
+ explicit(int{1}) S(int, int);
+};
+
+S<int> s(1);
+S<int> s2(1, 2);