https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122995
Bug ID: 122995
Summary: Modules regression: 15.2 ok, 16.0 ICEs
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: webrown.cpp at gmail dot com
Target Milestone: ---
Consider the following two module source files:
// ----- bug2.cc
export module bug2;
namespace N {
namespace C { struct r3_cpo; } export extern inline C::r3_cpo const r3;
}
// ----- bug.cc
export module bug;
import bug2;
namespace N {
namespace C { struct r1_cpo; } export extern inline C::r1_cpo const r1;
namespace C { struct r2_cpo; } export extern inline C::r2_cpo const r2;
}
Compile bug2.cc, then bug.cc, each with command: g++ -fmodules-ts -std=c++26
File bug2.cc compiles error-free for me with either gcc15.2 or recent gcc16.0
(r16-5785-g3b30d09ac7bbf8).
File bug.cc compiles error-free for me with gcc15.2, but gcc16.0 complains:
internal compiler error: in expose_existing_namespace, at
cp/name-lookup.cc:9276
I encountered this apparent regression on a recent Macbook Pro under MacOS
15.7. A colleague reported that he reproduced this behavior on a
powerpc64le-linux box.