aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2010-11-03 13:31:40 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2010-11-03 13:31:40 +0000
commit68a22980da9a9705dff9d870e422c8efce414ae2 (patch)
tree9772de7fa53ed090eba46b60b08c6464c39f3e23 /gcc/dwarf2out.c
parent8b8bba2dd98b692b749bf023abf02c245ecd2515 (diff)
downloadgcc-68a22980da9a9705dff9d870e422c8efce414ae2.zip
gcc-68a22980da9a9705dff9d870e422c8efce414ae2.tar.gz
gcc-68a22980da9a9705dff9d870e422c8efce414ae2.tar.bz2
re PR debug/46241 (ice in dwarf2out.c)
2010-11-03 Richard Guenther <rguenther@suse.de> PR middle-end/46241 * dwarf2out.c (scope_die_for): Properly detect global scope. * g++.dg/debug/pr46241.C: New testcase. From-SVN: r166245
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 9209c0d..9bb569b 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -17739,7 +17739,7 @@ scope_die_for (tree t, dw_die_ref context_die)
if (containing_scope && TREE_CODE (containing_scope) == FUNCTION_TYPE)
containing_scope = NULL_TREE;
- if (containing_scope == NULL_TREE)
+ if (SCOPE_FILE_SCOPE_P (containing_scope))
scope_die = comp_unit_die ();
else if (TYPE_P (containing_scope))
{