https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98422
Bug ID: 98422 Summary: C++ 20 module ICE with lto Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: unlvsur at live dot com Target Milestone: --- import hello; int main() { greeter("hello world"); } cqwrteur@Home-Server:~/wwwww/module$ g++ -c main.cc -Ofast -std=c++20 -s -flto -s -fmodules-ts main.cc:5:1: error: type variant differs by TYPE_MODE 5 | } | ^ <record_type 0x7f54a6bd87e0 type_info addressable cxx-odr-p type_1 type_4 type_5 type_6 BLK size <integer_cst 0x7f54a6a90f00 type <integer_type 0x7f54a6aae0a8 bitsizetype> constant 128> unit-size <integer_cst 0x7f54a6a90f18 type <integer_type 0x7f54a6aae000 sizetype> constant 16> align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7f54a6bd87e0 fields <field_decl 0x7f54a5f09390 _vptr.type_info type <pointer_type 0x7f54a6bd4b28 type <pointer_type 0x7f54a6bd47e0 __vtbl_ptr_type> sizes-gimplified public unsigned DI size <integer_cst 0x7f54a6a90eb8 constant 64> unit-size <integer_cst 0x7f54a6a90ed0 constant 8> align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7f54a6bd4b28 pointer_to_this <pointer_type 0x7f54a38a3dc8>> used unsigned virtual DI /usr/local/include/c++/11.0.0/typeinfo:88:9 size <integer_cst 0x7f54a6a90eb8 64> unit-size <integer_cst 0x7f54a6a90ed0 8> align:64 warn_if_not_align:0 offset_align 128 offset <integer_cst 0x7f54a6a90ee8 constant 0> bit-offset <integer_cst 0x7f54a6a90f30 constant 0> context <record_type 0x7f54a6bd87e0 type_info> chain <field_decl 0x7f54a5f09428 __name type <pointer_type 0x7f54a6aba498> used protected unsigned nonlocal decl_3 DI /usr/local/include/c++/11.0.0/typeinfo:174:17 size <integer_cst 0x7f54a6a90eb8 64> unit-size <integer_cst 0x7f54a6a90ed0 8> align:64 warn_if_not_align:0 offset_align 128 offset <integer_cst 0x7f54a6a90ee8 0> bit-offset <integer_cst 0x7f54a6a90eb8 64> context <record_type 0x7f54a6bd87e0 type_info>>> context <namespace_decl 0x7f54a6aab098 std> pointer_to_this <pointer_type 0x7f54a5f0d000> reference_to_this <reference_type 0x7f54a5f0d2a0>> <record_type 0x7f54a6bd8888 type_info readonly cxx-odr-p type_1 type_4 type_5 VOID size <integer_cst 0x7f54a6a90f00 type <integer_type 0x7f54a6aae0a8 bitsizetype> constant 128> unit-size <integer_cst 0x7f54a6a90f18 type <integer_type 0x7f54a6aae000 sizetype> constant 16> align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7f54a6bd8888 fields <field_decl 0x7f54a5f09390 _vptr.type_info type <pointer_type 0x7f54a6bd4b28 type <pointer_type 0x7f54a6bd47e0 __vtbl_ptr_type> sizes-gimplified public unsigned DI size <integer_cst 0x7f54a6a90eb8 constant 64> unit-size <integer_cst 0x7f54a6a90ed0 constant 8> align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7f54a6bd4b28 pointer_to_this <pointer_type 0x7f54a38a3dc8>> used unsigned virtual DI /usr/local/include/c++/11.0.0/typeinfo:88:9 size <integer_cst 0x7f54a6a90eb8 64> unit-size <integer_cst 0x7f54a6a90ed0 8> align:64 warn_if_not_align:0 offset_align 128 offset <integer_cst 0x7f54a6a90ee8 constant 0> bit-offset <integer_cst 0x7f54a6a90f30 constant 0> context <record_type 0x7f54a6bd87e0 type_info> chain <field_decl 0x7f54a5f09428 __name type <pointer_type 0x7f54a6aba498> used protected unsigned nonlocal decl_3 DI /usr/local/include/c++/11.0.0/typeinfo:174:17 size <integer_cst 0x7f54a6a90eb8 64> unit-size <integer_cst 0x7f54a6a90ed0 8> align:64 warn_if_not_align:0 offset_align 128 offset <integer_cst 0x7f54a6a90ee8 0> bit-offset <integer_cst 0x7f54a6a90eb8 64> context <record_type 0x7f54a6bd87e0 type_info>>> context <namespace_decl 0x7f54a6aab098 std> pointer_to_this <pointer_type 0x7f54a6bd8930> reference_to_this <reference_type 0x7f54a5f0d150>> during IPA pass: *free_lang_data main.cc:5:1: internal compiler error: 'verify_type' failed 0x13937e5 verify_type(tree_node const*) ../../gcc/gcc/tree.c:14906 0x1396b33 free_lang_data ../../gcc/gcc/tree.c:6436 0x1396b33 execute ../../gcc/gcc/tree.c:6481 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions.