diff mbox series

c++: module-related tweak

Message ID 8a226cc9-f9b7-d10c-584f-d58437b1ffa6@acm.org
State New
Headers show
Series c++: module-related tweak | expand

Commit Message

Nathan Sidwell Dec. 14, 2020, 9:27 p.m. UTC
In manually applying a name-lookup patch, I managed to transpose two 
calls.  That caused a test failure.  Fixed thusly.

             gcc/cp/
             * name-lookup.c (do_namespace_alias): Set originating module
             before pushing.

pushing to trunk
diff mbox series

Patch

diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c
index 03d2bc5984b..ab669bcb720 100644
--- a/gcc/cp/name-lookup.c
+++ b/gcc/cp/name-lookup.c
@@ -6223,10 +6223,10 @@  do_namespace_alias (tree alias, tree name_space)
   DECL_NAMESPACE_ALIAS (alias) = name_space;
   DECL_EXTERNAL (alias) = 1;
   DECL_CONTEXT (alias) = FROB_CONTEXT (current_scope ());
-  pushdecl (alias);
-
   set_originating_module (alias);
 
+  pushdecl (alias);
+
   /* Emit debug info for namespace alias.  */
   if (!building_stmt_list_p ())
     (*debug_hooks->early_global_decl) (alias);