https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122774
Nathaniel Shead <nshead at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Last reconfirmed| |2025-11-28
--- Comment #7 from Nathaniel Shead <nshead at gcc dot gnu.org> ---
Reduced:
// a.cpp
export module M;
export extern "C" int scanf(const char *...);
// b.cpp
import M;
extern "C" int scanf(const char *...);
int scanf(const char *...);
using ::scanf;
The issue specifically occurs when matching hidden builtins (so changing
'scanf' to 'foo' silences the ICE). From a quick look we're adding the same
declaration multiple times to a binding, which we should not do.