https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120884
Bug ID: 120884
Summary: internal compiler error: in tsubst_pack_expansion, at
cp/pt.cc:14029 since 14.1
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: mario.rodriguezb1 at um dot es
Target Milestone: ---
Might be related to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119346:
Program:
```
#include <tuple>
#include <type_traits>
#include <iostream>
int main()
{
std::tuple<int, double, std::string> tup{1, 2, "3"};
std::apply(
[](auto... args)
-> std::enable_if_t<requires{!(sizeof...(args) < 0), (... &
std::is_integral_v<std::remove_cv_t<std::remove_reference_t<decltype(args)>>>),}>,
tup);
}
```
Stack dump:
```
<source>:9:14: internal compiler error: in tsubst_pack_expansion, at
cp/pt.cc:14029
9 | [](auto... args)
| ~~~~^~~~~~~~
0x2844425 diagnostic_context::diagnostic_impl(rich_location*,
diagnostic_metadata const*, diagnostic_option_id, char const*, __va_list_tag
(*) [1], diagnostic_t)
???:0
0x2866fc6 internal_error(char const*, ...)
???:0
0xaede72 fancy_abort(char const*, int, char const*)
???:0
0xd60a53 tsubst_pack_expansion(tree_node*, tree_node*, int, tree_node*)
???:0
0xb78076 tsubst_requires_expr(tree_node*, tree_node*, int, tree_node*)
???:0
0xd166e3 c_parse_file()
???:0
0xe7e469 c_common_parse_file()
???:0
```
To quickly reproduce:
https://godbolt.org/z/GjPoc6P7b