From 7ecfd590a05ce0c39ffdeed7bddb1ec755706947 Mon Sep 17 00:00:00 2001 From: hubicka Date: Thu, 18 Aug 2005 15:22:46 +0000 Subject: PR c++/22034 * cgraphunit.c (cgraph_varpool_assemble_pending_decls): Emit debug info only for local statics, not for member variables. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@103251 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/cgraphunit.c | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f59452de530..fcc7fba7011 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2005-08-18 Jan Hubicka + + PR c++/22034 + * cgraphunit.c (cgraph_varpool_assemble_pending_decls): Emit debug + info only for local statics, not for member variables. + 2005-08-18 Volker Reichelt * tree-data-ref.c (analyze_siv_subscript_cst_affine): Fix comment typo. diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index a10859dd0bc..012cb7c2308 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -814,7 +814,10 @@ cgraph_varpool_assemble_pending_decls (void) assemble_variable (decl, 0, 1, 0); /* Local static variables are never seen by check_global_declarations so we need to output debug info by hand. */ - if (decl_function_context (decl) && errorcount == 0 && sorrycount == 0) + if (DECL_CONTEXT (decl) + && (TREE_CODE (DECL_CONTEXT (decl)) == BLOCK + || TREE_CODE (DECL_CONTEXT (decl)) == FUNCTION_DECL) + && errorcount == 0 && sorrycount == 0) { timevar_push (TV_SYMOUT); (*debug_hooks->global_decl) (decl); -- cgit v1.2.1