diff options
author | Jason Merrill <jason@redhat.com> | 2003-03-15 12:06:24 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2003-03-15 12:06:24 -0500 |
commit | 8cadae7e83c8090de6e91ba835107ead73d553e7 (patch) | |
tree | b3b0dcb311f7dbbc7572f89d71648eaaefa477d8 /gcc | |
parent | ac2768ff6b723ab0899f516e4541b38bff595a41 (diff) | |
download | gcc-8cadae7e83c8090de6e91ba835107ead73d553e7.zip gcc-8cadae7e83c8090de6e91ba835107ead73d553e7.tar.gz gcc-8cadae7e83c8090de6e91ba835107ead73d553e7.tar.bz2 |
re PR debug/6387 (-fpic -gdwarf-2 -g1 combination give ICE in dwarf2out)
PR debug/6387
* dwarf2out.c (dwarf2out_decl): If we're at -g1, just stick nested
function DIEs at toplevel.
(decls_for_scope): At -g1, don't descend into subblocks.
From-SVN: r64410
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/dwarf2out.c | 8 |
2 files changed, 14 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b2ffd69..2a73783 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2003-03-15 Jason Merrill <jason@redhat.com> + + PR debug/6387 + * dwarf2out.c (dwarf2out_decl): If we're at -g1, just stick nested + function DIEs at toplevel. + (decls_for_scope): At -g1, don't descend into subblocks. + 2003-03-15 Ulrich Weigand <uweigand@de.ibm.com> * varasm.c (struct rtx_const): Change type of un.addr member diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 6a15a3b..e31fcb8 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -12018,6 +12018,10 @@ decls_for_scope (stmt, context_die, depth) gen_decl_die (decl, context_die); } + /* If we're at -g1, we're not interested in subblocks. */ + if (debug_info_level <= DINFO_LEVEL_TERSE) + return; + /* Output the DIEs to represent all sub-blocks (and the items declared therein) of this block. */ for (subblocks = BLOCK_SUBBLOCKS (stmt); @@ -12286,7 +12290,9 @@ dwarf2out_decl (decl) /* If we're a nested function, initially use a parent of NULL; if we're a plain function, this will be fixed up in decls_for_scope. If we're a method, it will be ignored, since we already have a DIE. */ - if (decl_function_context (decl)) + if (decl_function_context (decl) + /* But if we're in terse mode, we don't care about scope. */ + && debug_info_level > DINFO_LEVEL_TERSE) context_die = NULL; break; |