https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116384

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
I think the fix is just:

--- a/gcc/cp/pt.cc
+++ b/gcc/cp/pt.cc
@@ -20217,6 +20217,8 @@ tsubst_expr (tree t, tree args, tsubst_flags_t
complain, tree in_decl)
     case IMPLICIT_CONV_EXPR:
       {
    tree type = tsubst (TREE_TYPE (t), args, complain, in_decl);
+   if (type == error_mark_node)
+     RETURN (error_mark_node);
    tree expr = RECUR (TREE_OPERAND (t, 0));
    if (dependent_type_p (type) || type_dependent_expression_p (expr))
      {

Reply via email to