summaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2012-01-03 11:30:27 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2012-01-03 11:30:27 +0000
commite94f8cec575301a8a84e2abee5c6c25e057eb718 (patch)
tree1436a514ff17b1c15608dc6c9b85d39a081fcbbc /gcc/dwarf2out.c
parent73a98f369b8c571f1f158e0e0889209af5294cdd (diff)
downloadgcc-e94f8cec575301a8a84e2abee5c6c25e057eb718.tar.gz
2012-01-03 Richard Guenther <rguenther@suse.de>
PR debug/51650 * dwarf2out.c (dwarf2out_finish): Always create a DIE for the context of a limbo DIE when it does not already exist. * g++.dg/lto/pr51650-3_0.C: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182835 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 850eb556217..b5537752b13 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -22501,15 +22501,8 @@ dwarf2out_finish (const char *filename)
else if (TYPE_P (node->created_for))
context = TYPE_CONTEXT (node->created_for);
- gcc_assert (context
- && (TREE_CODE (context) == FUNCTION_DECL
- || TREE_CODE (context) == NAMESPACE_DECL));
-
- origin = lookup_decl_die (context);
- if (origin)
- add_child_die (origin, die);
- else
- add_child_die (comp_unit_die (), die);
+ origin = get_context_die (context);
+ add_child_die (origin, die);
}
}
}