https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125035

            Bug ID: 125035
           Summary: [16 Regression] ICE in register_duplicate, at
                    cp/module.cc:13060
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: doko at gcc dot gnu.org
  Target Milestone: ---

Created attachment 64286
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=64286&action=edit
test case

seen with the gcc 16 branch 20260425, works with the gcc-15 branch, reported
as https://bugs.debian.org/1133179


g++-16 -std=gnu++26 -fmodules   -c -o qt.o qt.cpp
g++-16 -std=gnu++26 -fmodules   -c -o failed_mod.o failed_mod.cpp
In file included from failed_mod.cpp:3:
minimal.h:56:13: internal compiler error: in register_duplicate, at
cp/module.cc:13060
   56 |     return {};
      |             ^
0x21b290d internal_error(char const*, ...)
        ../../src/gcc/diagnostic-global-context.cc:787
0x21b2a7f fancy_abort(char const*, int, char const*)
        ../../src/gcc/diagnostics/context.cc:1813
0x1852d0d register_duplicate
        ../../src/gcc/cp/module.cc:13060
0x1849c69 decl_value
        ../../src/gcc/cp/module.cc:8819
0x1845b02 tree_node
        ../../src/gcc/cp/module.cc:10437
0x185f215 module_state::read_cluster(unsigned int)
        ../../src/gcc/cp/module.cc:17702
0x186b8c3 module_state::load_section(unsigned int, binding_slot*)
        ../../src/gcc/cp/module.cc:21536
0x186b9cc module_state::lazy_load(unsigned int, binding_slot*)
        ../../src/gcc/cp/module.cc:22565
0x1847730 tree_node
        ../../src/gcc/cp/module.cc:11045
0x185e955 module_state::read_cluster(unsigned int)
        ../../src/gcc/cp/module.cc:17539
0x186b8c3 module_state::load_section(unsigned int, binding_slot*)
        ../../src/gcc/cp/module.cc:21536
0x186b9cc module_state::lazy_load(unsigned int, binding_slot*)
        ../../src/gcc/cp/module.cc:22565
0x1847730 tree_node
        ../../src/gcc/cp/module.cc:11045
0x185e955 module_state::read_cluster(unsigned int)
        ../../src/gcc/cp/module.cc:17539
0x186b8c3 module_state::load_section(unsigned int, binding_slot*)
        ../../src/gcc/cp/module.cc:21536
0x186b9cc module_state::lazy_load(unsigned int, binding_slot*)
        ../../src/gcc/cp/module.cc:22565
0x186d1ea lazy_load_pendings(tree_node*, tree_node*)
        ../../src/gcc/cp/module.cc:22666
0xe5d373 instantiate_decl(tree_node*, bool, bool) [clone .constprop.0]
        ../../src/gcc/cp/pt.cc:28759
0x23e84e8 instantiate_pending_templates(int)
        ../../src/gcc/cp/pt.cc:29054
0x23e2477 c_parse_final_cleanups()
        ../../src/gcc/cp/decl2.cc:5887
/usr/libexec/gcc/x86_64-linux-gnu/16/cc1plus -quiet -imultiarch
x86_64-linux-gnu -D_GNU_SOURCE failed_mod.cpp -quiet -dumpbase failed_mod.cpp
-dumpbase-ext .cpp -mtune=generic -march=x86-64 -std=gnu++26 -fmodules
-fasynchronous-unwind-tables -o /tmp/ccVZfzVL.s
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <file:///usr/share/doc/gcc-16/README.Bugs> for instructions.
make: *** [<builtin>: failed_mod.o] Error 1

Reply via email to