public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/115425] New: ICE: tree check: expected type_pack_expansion or expr_pack_expansion, have error_mark in tsubst_pack_expansion, at cp/pt.cc:13778
@ 2024-06-11 3:01 hewillk at gmail dot com
2024-06-11 4:06 ` [Bug c++/115425] " pinskia at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: hewillk at gmail dot com @ 2024-06-11 3:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115425
Bug ID: 115425
Summary: ICE: tree check: expected type_pack_expansion or
expr_pack_expansion, have error_mark in
tsubst_pack_expansion, at cp/pt.cc:13778
Product: gcc
Version: 15.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
This seems like 15 regressions and may related to the constexpr static local
variable.
https://godbolt.org/z/sf4f3Woqa
#include <tuple>
template<std::size_t... Is>
void foo(std::index_sequence<Is...>);
template<auto>
struct S;
template<class T>
auto test() {
using Seq = std::make_index_sequence<std::tuple_size_v<T>>;
constexpr static auto x = foo<Seq>();
return []<std::size_t... Is>(std::index_sequence<Is...>) {
(typename S<x[Is]>::type{}, ...);
}(std::make_index_sequence<0>{});
}
int main() {
test<std::tuple<>>();
}
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/115425] ICE: tree check: expected type_pack_expansion or expr_pack_expansion, have error_mark in tsubst_pack_expansion, at cp/pt.cc:13778
2024-06-11 3:01 [Bug c++/115425] New: ICE: tree check: expected type_pack_expansion or expr_pack_expansion, have error_mark in tsubst_pack_expansion, at cp/pt.cc:13778 hewillk at gmail dot com
@ 2024-06-11 4:06 ` pinskia at gcc dot gnu.org
2024-06-12 3:29 ` [Bug c++/115425] [13/14/15 regression] " sjames at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-06-11 4:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115425
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
> 15 regressions
It might not be because this is a checking enabled ICE.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/115425] [13/14/15 regression] ICE: tree check: expected type_pack_expansion or expr_pack_expansion, have error_mark in tsubst_pack_expansion, at cp/pt.cc:13778
2024-06-11 3:01 [Bug c++/115425] New: ICE: tree check: expected type_pack_expansion or expr_pack_expansion, have error_mark in tsubst_pack_expansion, at cp/pt.cc:13778 hewillk at gmail dot com
2024-06-11 4:06 ` [Bug c++/115425] " pinskia at gcc dot gnu.org
@ 2024-06-12 3:29 ` sjames at gcc dot gnu.org
2024-06-13 16:29 ` mpolacek at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: sjames at gcc dot gnu.org @ 2024-06-12 3:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115425
Sam James <sjames at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|ICE: tree check: expected |[13/14/15 regression] ICE:
|type_pack_expansion or |tree check: expected
|expr_pack_expansion, have |type_pack_expansion or
|error_mark in |expr_pack_expansion, have
|tsubst_pack_expansion, at |error_mark in
|cp/pt.cc:13778 |tsubst_pack_expansion, at
| |cp/pt.cc:13778
--- Comment #2 from Sam James <sjames at gcc dot gnu.org> ---
The ICE started in 13.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/115425] [13/14/15 regression] ICE: tree check: expected type_pack_expansion or expr_pack_expansion, have error_mark in tsubst_pack_expansion, at cp/pt.cc:13778
2024-06-11 3:01 [Bug c++/115425] New: ICE: tree check: expected type_pack_expansion or expr_pack_expansion, have error_mark in tsubst_pack_expansion, at cp/pt.cc:13778 hewillk at gmail dot com
2024-06-11 4:06 ` [Bug c++/115425] " pinskia at gcc dot gnu.org
2024-06-12 3:29 ` [Bug c++/115425] [13/14/15 regression] " sjames at gcc dot gnu.org
@ 2024-06-13 16:29 ` mpolacek at gcc dot gnu.org
2024-06-14 0:01 ` mpolacek at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2024-06-13 16:29 UTC (permalink / raw)
To: gcc-bugs
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 <ppalka@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))
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/115425] [13/14/15 regression] ICE: tree check: expected type_pack_expansion or expr_pack_expansion, have error_mark in tsubst_pack_expansion, at cp/pt.cc:13778
2024-06-11 3:01 [Bug c++/115425] New: ICE: tree check: expected type_pack_expansion or expr_pack_expansion, have error_mark in tsubst_pack_expansion, at cp/pt.cc:13778 hewillk at gmail dot com
` (2 preceding siblings ...)
2024-06-13 16:29 ` mpolacek at gcc dot gnu.org
@ 2024-06-14 0:01 ` mpolacek at gcc dot gnu.org
2024-06-25 19:14 ` cvs-commit at gcc dot gnu.org
2024-06-25 19:20 ` [Bug c++/115425] [13/14 " mpolacek at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2024-06-14 0:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115425
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot gnu.org
Status|NEW |ASSIGNED
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/115425] [13/14/15 regression] ICE: tree check: expected type_pack_expansion or expr_pack_expansion, have error_mark in tsubst_pack_expansion, at cp/pt.cc:13778
2024-06-11 3:01 [Bug c++/115425] New: ICE: tree check: expected type_pack_expansion or expr_pack_expansion, have error_mark in tsubst_pack_expansion, at cp/pt.cc:13778 hewillk at gmail dot com
` (3 preceding siblings ...)
2024-06-14 0:01 ` mpolacek at gcc dot gnu.org
@ 2024-06-25 19:14 ` cvs-commit at gcc dot gnu.org
2024-06-25 19:20 ` [Bug c++/115425] [13/14 " mpolacek at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-06-25 19:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115425
--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Marek Polacek <mpolacek@gcc.gnu.org>:
https://gcc.gnu.org/g:ed6ffc4e62f716d1b31d599d22594dd969da137f
commit r15-1621-ged6ffc4e62f716d1b31d599d22594dd969da137f
Author: Marek Polacek <polacek@redhat.com>
Date: Fri Jun 14 17:50:29 2024 -0400
c++: ICE with generic lambda and pack expansion [PR115425]
In r13-272 we hardened the *_PACK_EXPANSION and *_ARGUMENT_PACK macros.
That trips up here because make_pack_expansion returns error_mark_node
and we access that with PACK_EXPANSION_LOCAL_P.
PR c++/115425
gcc/cp/ChangeLog:
* pt.cc (tsubst_pack_expansion): Return error_mark_node if
make_pack_expansion doesn't work out.
gcc/testsuite/ChangeLog:
* g++.dg/cpp2a/lambda-generic12.C: New test.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/115425] [13/14 regression] ICE: tree check: expected type_pack_expansion or expr_pack_expansion, have error_mark in tsubst_pack_expansion, at cp/pt.cc:13778
2024-06-11 3:01 [Bug c++/115425] New: ICE: tree check: expected type_pack_expansion or expr_pack_expansion, have error_mark in tsubst_pack_expansion, at cp/pt.cc:13778 hewillk at gmail dot com
` (4 preceding siblings ...)
2024-06-25 19:14 ` cvs-commit at gcc dot gnu.org
@ 2024-06-25 19:20 ` mpolacek at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2024-06-25 19:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115425
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
Summary|[13/14/15 regression] ICE: |[13/14 regression] ICE:
|tree check: expected |tree check: expected
|type_pack_expansion or |type_pack_expansion or
|expr_pack_expansion, have |expr_pack_expansion, have
|error_mark in |error_mark in
|tsubst_pack_expansion, at |tsubst_pack_expansion, at
|cp/pt.cc:13778 |cp/pt.cc:13778
--- Comment #5 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Fixed on trunk.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-06-25 19:20 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-11 3:01 [Bug c++/115425] New: ICE: tree check: expected type_pack_expansion or expr_pack_expansion, have error_mark in tsubst_pack_expansion, at cp/pt.cc:13778 hewillk at gmail dot com
2024-06-11 4:06 ` [Bug c++/115425] " pinskia at gcc dot gnu.org
2024-06-12 3:29 ` [Bug c++/115425] [13/14/15 regression] " sjames at gcc dot gnu.org
2024-06-13 16:29 ` mpolacek at gcc dot gnu.org
2024-06-14 0:01 ` mpolacek at gcc dot gnu.org
2024-06-25 19:14 ` cvs-commit at gcc dot gnu.org
2024-06-25 19:20 ` [Bug c++/115425] [13/14 " mpolacek at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).