]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR debug/37890 (Incorrect nesting for DW_TAG_imported_declaration)
authorJakub Jelinek <jakub@redhat.com>
Tue, 17 Mar 2009 17:52:08 +0000 (18:52 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 17 Mar 2009 17:52:08 +0000 (18:52 +0100)
PR debug/37890
* name-lookup.c (do_namespace_alias): Don't call global_decl debug
hook at function scope.

From-SVN: r144913

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

index b25d19be7cbe613a81f8494ab94ba93d014036e4..f948a6e32f6069e8ba708bd90632e4362d6257e7 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 eec7c44cbd9e9f593e2e30a9111bbdb205c34ab4..308df8c9c171f0b74de98dbcdd4716eb3dc682e5 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,