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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Wonder about:
--- gcc/cp/pt.c.jj      2018-04-05 15:02:40.290261785 +0200
+++ gcc/cp/pt.c 2018-04-05 15:59:07.174322871 +0200
@@ -16222,6 +16222,11 @@ tsubst_decomp_names (tree decl, tree pat
       DECL_HAS_VALUE_EXPR_P (decl2) = 0;
       SET_DECL_VALUE_EXPR (decl2, NULL_TREE);
       decl3 = tsubst (decl2, args, complain, in_decl);
+      if (!VAR_P (decl3))
+       {
+         decl = error_mark_node;
+         continue;
+       }
       SET_DECL_VALUE_EXPR (decl2, v);
       DECL_HAS_VALUE_EXPR_P (decl2) = 1;
       if (VAR_P (decl3))
but am not 100% sure if we have must have emitted an error in this case already
(perhaps add gcc_assert (errorcount);).

Reply via email to