aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2009-03-17 18:52:08 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2009-03-17 18:52:08 +0100
commit47512a6e9deb02e7f81311de32fa3a9a06b94bae (patch)
tree3826fc3d5125b9261ec0d0ab184e10d701c188e0
parent98381eb4870eb42b220822a8596104b42277bdf5 (diff)
downloadgcc-47512a6e9deb02e7f81311de32fa3a9a06b94bae.zip
gcc-47512a6e9deb02e7f81311de32fa3a9a06b94bae.tar.gz
gcc-47512a6e9deb02e7f81311de32fa3a9a06b94bae.tar.bz2
re PR debug/37890 (Incorrect nesting for DW_TAG_imported_declaration)
PR debug/37890 * name-lookup.c (do_namespace_alias): Don't call global_decl debug hook at function scope. From-SVN: r144913
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/name-lookup.c3
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index b25d19b..f948a6e 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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.
diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c
index eec7c44..308df8c 100644
--- a/gcc/cp/name-lookup.c
+++ b/gcc/cp/name-lookup.c
@@ -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,