https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99344
Bug ID: 99344
Summary: [modules] import failure with intermediate namespace
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: nathan at gcc dot gnu.org
Target Milestone: ---
found during work on 99170
// bug_a.ii
module ;
# 4 "bug_a.ii" 1
namespace STD::RANGES::INNER
{
void Frob ();
}
struct gnu_char_traits
{
void Frob()
{
STD::RANGES::INNER::Frob ();
}
};
# 19 "" 2
export module hello;
export void greeter (gnu_char_traits const &name);
// bug_b.ii
import hello;
/cc1plus -quiet -fmodules-ts bug_a.ii -fdump-lang-module -dumpbase a &&
./cc1plus -quiet -fmodules-ts bug_b.ii -fdump-lang-module -dumpbase b
In module imported at bug_b.ii:1:1:
hello: error: failed to read compiled module: Bad file data
hello: note: compiled module file is 'gcm.cache/hello.gcm'
hello: fatal error: returning to the gate for a mechanical issue
compilation terminated.
We think RANGES is an xref'd namespace :(