OVL_EXPORT_P (old.get_using ()) = true;
}
else if (!DECL_LANG_SPECIFIC (inner)
- || !DECL_MODULE_PURVIEW_P (inner))
+ || !DECL_MODULE_PURVIEW_P (inner)
+ || (exporting_p && !DECL_MODULE_EXPORT_P (inner)))
/* We need to re-insert this function as a revealed
(possibly exported) declaration. We can't remove
the existing decl because that will change any
found = true;
if (revealing_p
&& (!DECL_LANG_SPECIFIC (inner)
- || !DECL_MODULE_PURVIEW_P (inner)))
+ || !DECL_MODULE_PURVIEW_P (inner)
+ || (exporting_p && !DECL_MODULE_EXPORT_P (inner))))
found = false;
break;
}
--- /dev/null
+// PR c++/120195
+// { dg-additional-options "-fmodules" }
+
+export module M;
+
+extern "C++" void foo() {}
+export using ::foo;
+
+namespace ns {
+ extern "C" void bar() {}
+}
+extern "C" void bar();
+export using ns::bar;