PR debug/37890
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 17 Mar 2009 17:52:08 +0000 (17:52 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 17 Mar 2009 17:52:08 +0000 (17:52 +0000)
* name-lookup.c (do_namespace_alias): Don't call global_decl debug
hook at function scope.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@144913 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/name-lookup.c

index b25d19b..f948a6e 100644 (file)
@@ -6,6 +6,10 @@
        * cp-gimplify.c (cp_gimplify_expr): Don't assert the first operand
        is a NAMESPACE_DECL.
 
+       PR debug/37890
+       * name-lookup.c (do_namespace_alias): Don't call global_decl debug
+       hook at function scope.
+
        PR debug/39471
        * cp-gimplify.c (cp_gimplify_expr): Don't set DECL_NAME
        on IMPORTED_DECL.
index eec7c44..308df8c 100644 (file)
@@ -3337,7 +3337,8 @@ do_namespace_alias (tree alias, tree name_space)
   pushdecl (alias);
 
   /* Emit debug info for namespace alias.  */
-  (*debug_hooks->global_decl) (alias);
+  if (!building_stmt_tree ())
+    (*debug_hooks->global_decl) (alias);
 }
 
 /* Like pushdecl, only it places X in the current namespace,