https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119564
Bug ID: 119564
Summary: ICE using module including boost headers
Product: gcc
Version: 15.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: cjangus at gmail dot com
Target Milestone: ---
The following repro is a partial reduction of original code that was using
boost.json, but at some point it became impossible to reduce further so this is
a preprocessed repro from the point I'd got it down to.
There are two translation units:
- a module interface which includes boost code into its GMF and has an empty
purview; this compiles successfully
- a regular translation unit which includes a std header, then imports the
above module; this triggers an ICE
Command lines:
g++ -fPIC -Og -g -Wall -fmodules -std=c++2b -finput-charset=UTF-8 -o
out/repro_module.a.gcm.o -c -x c++ -fpreprocessed -fdirectives-only
repro_module.a.gcm.ii
g++ -fPIC -Og -g -Wall -fmodules -std=c++2b -finput-charset=UTF-8 -o
out/repro_consumer.a.o -c -x c++ -fpreprocessed -fdirectives-only
repro_consumer.a.o.ii
Output:
/.../gcc_repro.cpp: In function ‘(static initializers for /.../gcc_repro.cpp)’:
/.../gcc_repro.cpp:4:20: internal compiler error: in
tree_node_structure_for_code, at tree.cc:603
4 | import gcc_repro_a;
System/version:
Target: x86_64-pc-linux-gnu
Configured with: ../configure --prefix=/opt/gcc-latest --enable-languages=c,c++
--enable-libstdcxx-debug --enable-libstdcxx-backtrace --disable-bootstrap
--disable-multilib --disable-libvtv --disable-libssp --disable-libffi
--with-system-zlib --without-isl --with-arch_64=x86-64-v2
--with-bugurl=https://gcc.gnu.org/bugzilla
gcc version 15.0.1 20250223 (experimental) (GCC)