Bootstrapped and regtested on x86_64-pc-linux-gnu, pushing as obvious.
-- >8 --
When I wrote this check in r16-5811 I was thinking of checking if the
using-directive was imported, but this just checks if the target
namespace was imported, which is not what we want. We don't build deps
to see if the using-directive itself was imported, so just remove the
check. I haven't been able to come up with a testcase this breaks but
it still seems reasonable to adjust.
gcc/cp/ChangeLog:
* module.cc (module_state::write_using_directives): Remove
incorrect condition.
Signed-off-by: Nathaniel Shead <[email protected]>
---
gcc/cp/module.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/cp/module.cc b/gcc/cp/module.cc
index 042b029a036..5c70e9bb469 100644
--- a/gcc/cp/module.cc
+++ b/gcc/cp/module.cc
@@ -17652,7 +17652,7 @@ module_state::write_using_directives (elf_out *to,
depset::hash &table,
have been walked earlier (PR c++/122915). But importers will
be able to just refer to the decl in that module unless it was
a partition anyway, so we don't have anything to do here. */
- if (!target_dep || target_dep->is_import ())
+ if (!target_dep)
{
gcc_checking_assert (DECL_MODULE_IMPORT_P (udir));
continue;
--
2.51.0