https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123393
Bug ID: 123393
Summary: ICE using fmtlib module
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: cjangus at gmail dot com
Target Milestone: ---
Created attachment 63215
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=63215&action=edit
Two module source files, compressed.
Hitting an ice when using the module provided by fmtlib. The attached source
(and also CE repro: https://godbolt.org/z/hEoffxzTY) are done with a quickly
thrown together, slightly cut down module made by pasting in relevant fmt
header sources. I'm afraid I don't have the time to fully reduce, but it
appears that something within the `#ifndef FMT_STD_H_` block is triggering it.
Also removal of `inline` in repro.cppm results in the code compiling without
issue.
It looks like this is a regression, it doesn't reproduce for me on 15.0.1.
Compiler 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
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 16.0.0 20251228 (experimental) (GCC)
Repro invocations:
g++ -fPIC -Og -g -Wall -std=c++2b -fmodules -finput-charset=UTF-8 -c -x c++
fmt.cppm
g++ -fPIC -Og -g -Wall -std=c++2b -fmodules -finput-charset=UTF-8 -c -x c++
repro.cppm
Compiler output:
```
repro.cppm:1:8: internal compiler error: in operator(), at cp/module.cc:17853
1 | export module repro;
| ^~~~~~
```