https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110870
Nathaniel Shead <nshead at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Last reconfirmed| |2024-12-19 CC| |nshead at gcc dot gnu.org Blocks| |103524 Status|UNCONFIRMED |NEW --- Comment #3 from Nathaniel Shead <nshead at gcc dot gnu.org> --- On current trunk the error is different, an ICE in binding_cmp. Reduced: // header.hpp template <typename> struct X; template <typename T> X() -> X<T>; // a.cpp module; template <typename> struct X; using Y = X<char>; module M:part; import "header.hpp"; Y *z; // b.cpp export module M; import :part; $ g++ -fmodules -Wno-global-module -S header.hpp a.cpp b.cpp b.cpp:1:8: internal compiler error: in binding_cmp, at cp/module.cc:13976 1 | export module M; | ^~~~~~ 0x3cd9843 internal_error(char const*, ...) ../../gcc/gcc/diagnostic-global-context.cc:517 0x3ca4ecc fancy_abort(char const*, int, char const*) ../../gcc/gcc/diagnostic.cc:1704 0x111873d binding_cmp ../../gcc/gcc/cp/module.cc:13976 0x3d3f617 cmp1<sort_ctx> ../../gcc/gcc/sort.cc:151 0x3d3ef4f netsort<sort_ctx> ../../gcc/gcc/sort.cc:168 0x3d3e78e mergesort<sort_ctx> ../../gcc/gcc/sort.cc:205 0x3d3e45b gcc_qsort(void*, unsigned long, unsigned long, int (*)(void const*, void const*)) ../../gcc/gcc/sort.cc:268 0x1118e0c depset::hash::finalize_dependencies() ../../gcc/gcc/cp/module.cc:14060 0x11272e4 module_state::write_begin(elf_out*, cpp_reader*, module_state_config&, unsigned int&) ../../gcc/gcc/cp/module.cc:18605 0x112ee96 finish_module_processing(cpp_reader*) ../../gcc/gcc/cp/module.cc:21076 0x104e39e c_parse_final_cleanups() ../../gcc/gcc/cp/decl2.cc:5542 0x143473d c_common_parse_file() ../../gcc/gcc/c-family/c-opts.cc:1407 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