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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2024-06-13
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
   Target Milestone|---                         |13.4
                 CC|                            |mpolacek at gcc dot gnu.org

--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Started with r13-272-gdc6c96f0707aba:

commit dc6c96f0707aba6c2c94f41f3ccd0713381e372c
Author: Patrick Palka <ppa...@redhat.com>
Date:   Tue May 10 11:52:21 2022 -0400

    c++: Harden *_PACK_EXPANSION and *_ARGUMENT_PACK macros

I think the fix is just

--- a/gcc/cp/pt.cc
+++ b/gcc/cp/pt.cc
@@ -13748,6 +13748,8 @@ tsubst_pack_expansion (tree t, tree args,
tsubst_flags_t complain,
       else
    result = tsubst (pattern, args, complain, in_decl);
       result = make_pack_expansion (result, complain);
+      if (result == error_mark_node)
+   return error_mark_node;
       PACK_EXPANSION_LOCAL_P (result) = PACK_EXPANSION_LOCAL_P (t);
       PACK_EXPANSION_SIZEOF_P (result) = PACK_EXPANSION_SIZEOF_P (t);
       if (PACK_EXPANSION_AUTO_P (t))

Reply via email to