https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116568
Bug ID: 116568 Summary: [modules] ICE when exporting template using of unevaluated lambda in key_mergeable Product: gcc Version: 15.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: nshead at gcc dot gnu.org Blocks: 103524 Target Milestone: --- The following code: export module a; template <typename> struct Foo { template <typename> using Bar = decltype([]{}); }; using Qux = Foo<int>::Bar<int>; 'g++-15 -fmodules-ts -std=c++20 a.cpp' gives: a.cpp:1:8: internal compiler error: Segmentation fault 1 | export module a; | ^~~~~~ 0x3a9d530 internal_error(char const*, ...) ../../gcc/gcc/diagnostic-global-context.cc:492 0x1c2d5cc crash_signal ../../gcc/gcc/toplev.cc:321 0x7ffb54f4351f ??? ./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0 0x1083918 key_mergeable ../../gcc/gcc/cp/module.cc:10946 0x107440b decl_value ../../gcc/gcc/cp/module.cc:7943 0x109260e depset::hash::find_dependencies(module_state*) ../../gcc/gcc/cp/module.cc:13724 0x10a0f86 module_state::write_begin(elf_out*, cpp_reader*, module_state_config&, unsigned int&) ../../gcc/gcc/cp/module.cc:18400 0x10a8b35 finish_module_processing(cpp_reader*) ../../gcc/gcc/cp/module.cc:20890 0xfcc042 c_parse_final_cleanups() ../../gcc/gcc/cp/decl2.cc:5541 0x139690e c_common_parse_file() ../../gcc/gcc/c-family/c-opts.cc:1333 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103524 [Bug 103524] [meta-bug] modules issue