diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-12-05 20:51:07 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-12-05 20:51:07 +0000 |
commit | add5c2aefc1dfcfeb28b796697d519d38d9d472e (patch) | |
tree | a496414e1a9ff51b4b3e64e44c33ea196bbb7056 /gcc/c-decl.c | |
parent | d43c46819daab6f71476296ccd1d167df2fe1da2 (diff) | |
download | gcc-add5c2aefc1dfcfeb28b796697d519d38d9d472e.tar.gz |
PR debug/51410
* c-decl.c (pop_scope): Don't add DECL_EXTERNAL decls
for debug info if scope is file_scope.
* gcc.dg/debug/dwarf2/pr51410.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182027 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r-- | gcc/c-decl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 4338fdfc746..1cdbf2fe6a8 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -1196,7 +1196,7 @@ pop_scope (void) DECL_CHAIN (p) = BLOCK_VARS (block); BLOCK_VARS (block) = p; } - else if (VAR_OR_FUNCTION_DECL_P (p)) + else if (VAR_OR_FUNCTION_DECL_P (p) && scope != file_scope) { /* For block local externs add a special DECL_EXTERNAL decl for debug info generation. */ |