https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123235
Bug ID: 123235
Summary: [modules] ADL search for decl-reachable entities
doesn't complete types
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: nshead at gcc dot gnu.org
Blocks: 103524
Target Milestone: ---
Consider:
// a.cpp
module;
namespace C {
struct G {};
void qux(int, void*);
}
template <typename T> struct H : C::G {};
export module M;
template <typename T> void foo(T t) {
H<int>* h;
qux(t, h);
}
// b.cpp
module M;
void test() {
foo(0);
}
This should find C::qux as a decl-reachable entity by
https://eel.is/c++draft/module.global.frag#2.3 since ADL should consider the
associated entities of base class H<int>::G. Currently we do not however and
qux is discarded.
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103524
[Bug 103524] [meta-bug] modules issue