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

            Bug ID: 111785
           Summary: [modules] ICE when compiling fmt lib as module
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mends-sputter.0z at icloud dot com
  Target Milestone: ---

Created attachment 56095
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56095&action=edit
preprocessed output generated by -freport-bug

GCC 14.0 from recent snapshot (20231008) on aarch64

Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/opt/gcc14/libexec/gcc/aarch64-unknown-linux-gnu/14.0.0/lto-wrapper
Target: aarch64-unknown-linux-gnu
Configured with: ../configure --prefix=/opt/gcc14 --enable-languages=c,c++
--disable-multilib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 14.0.0 20231008 (experimental) (GCC)

When attempting to build fmt from https://github.com/fmtlib/fmt, with the
following command:
g++ -std=c++20 -fmodules-ts -I../include fmt.cc

The compiler ICEs with the following error:

fmt.cc:73:8: internal compiler error: in core_vals, at cp/module.cc:6262
   73 | export module fmt;
      |        ^
0x9a9b67 trees_out::core_vals(tree_node*)
        ../../gcc/cp/module.cc:6262
0x9add5f trees_out::tree_node_vals(tree_node*)
        ../../gcc/cp/module.cc:7218
0x9add5f trees_out::tree_value(tree_node*)
        ../../gcc/cp/module.cc:9083
0x9a7c73 trees_out::tree_node(tree_node*)
        ../../gcc/cp/module.cc:9281
0x9a9537 trees_out::core_vals(tree_node*)
        ../../gcc/cp/module.cc:6171
0x9a5fb3 trees_out::tree_node_vals(tree_node*)
        ../../gcc/cp/module.cc:7218
0x9a5fb3 trees_out::decl_value(tree_node*, depset*)
        ../../gcc/cp/module.cc:7797
0x9b0823 depset::hash::find_dependencies(module_state*)
        ../../gcc/cp/module.cc:13328
0x9b16c7 module_state::write_begin(elf_out*, cpp_reader*, module_state_config&,
unsigned int&)
        ../../gcc/cp/module.cc:17895
0x9b2a0f finish_module_processing(cpp_reader*)
        ../../gcc/cp/module.cc:20241
0x91df57 c_parse_final_cleanups()
        ../../gcc/cp/decl2.cc:5255
0xbe773f c_common_parse_file()
        ../../gcc/c-family/c-opts.cc:1296

attaching the file generated by -freport-bug - compressed with the gzip tool.

Note that this is similar and involves the same file as reported in this other
in a comment in a separate report:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108080#c7

however with gcc 14.0 snapshots, this fails with every level of optimization
flags, although in each case the crash dump is slightly different and fails on
a separate line.

Reply via email to