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

--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> ---
I believe this can be fixed by checking the return value of
grok_ctor_properties (consistently with its other usage in decl.c):

Index: pt.c
===================================================================
--- pt.c        (revision 246492)
+++ pt.c        (working copy)
@@ -12408,8 +12408,8 @@ tsubst_decl (tree t, tree args, tsubst_flags_t com
        if (DECL_CONSTRUCTOR_P (r) || DECL_DESTRUCTOR_P (r))
          {
            maybe_retrofit_in_chrg (r);
-           if (DECL_CONSTRUCTOR_P (r))
-             grok_ctor_properties (ctx, r);
+           if (DECL_CONSTRUCTOR_P (r) && !grok_ctor_properties (ctx, r))
+             RETURN (error_mark_node);
            /* If this is an instantiation of a member template, clone it.
               If it isn't, that'll be handled by
               clone_constructors_and_destructors.  */

Reply via email to