https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120350
Bug ID: 120350 Summary: [modules] address taken but ‘TREE_ADDRESSABLE’ bit not set for imported inline ref of typeid Product: gcc Version: 16.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: --- Consider: // a.cpp module; #include <typeinfo> export module M; struct S {}; export inline auto& x = typeid(S); // b.cpp import M; int main() { x == x; } $ g++ -fmodules -S a.cpp b.cpp b.cpp: In function ‘int main()’: b.cpp:2:5: error: address taken but ‘TREE_ADDRESSABLE’ bit not set 2 | int main() { | ^~~~ x.0_1 = &_ZTIW1M1S; b.cpp:2:5: error: address taken but ‘TREE_ADDRESSABLE’ bit not set x.1_2 = &_ZTIW1M1S; b.cpp:2:5: internal compiler error: ‘verify_gimple’ failed 0x3d7f97f internal_error(char const*, ...) ../../gcc/gcc/diagnostic-global-context.cc:517 0x1df90b7 verify_gimple_in_seq(gimple*, bool) ../../gcc/gcc/tree-cfg.cc:5350 0x190cf3a gimplify_body(tree_node*, bool) ../../gcc/gcc/gimplify.cc:20916 0x190d479 gimplify_function_tree(tree_node*) ../../gcc/gcc/gimplify.cc:21042 0x1618b64 cgraph_node::analyze() ../../gcc/gcc/cgraphunit.cc:689 0x161b055 analyze_functions ../../gcc/gcc/cgraphunit.cc:1265 0x161e6e1 symbol_table::finalize_compilation_unit() ../../gcc/gcc/cgraphunit.cc:2574 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