https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119548
Bug ID: 119548 Summary: ICE: tree check: accessed elt 2 of 'tree_vec' with 1 elts in tsubst_pack_expansion when accessing uninstantiated decltype(lambda template return) type, inside other lambda template Product: gcc Version: 14.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: frederik.hofe at pm dot me Target Milestone: --- Created attachment 60926 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=60926&action=edit minimum example code to trigger ICE Example.cpp build with: g++ -std=c++20 example.cpp This issue is 100% reproducible and I even found a workaround for it. (See: source code) I tested with all "x86-64 gcc" on godbolt that support C++20, and the ICE is triggered every time. This does not seem to be a regression. godbolt.org results: x86-64 gcc (trunk) (-std=c++20) <- internal compiler error: internal compiler error: tree check: accessed elt 2 of 'tree_vec' with 1 elts in tsubst_pack_expansion, at ... x86-64 gcc 14.2 ... 10.1(-std=c++20) <- internal compiler error: Segmentation fault x86-64 clang 20.1.0 (-std=c++20) <- works fine x64 msvc v19.40 BS17.10 (/std:c++20) <- works fine