summaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2011-12-19 09:03:45 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2011-12-19 09:03:45 +0000
commitb11e16d5eacc6bee8aa7ea50be5f2b3f95581b4b (patch)
tree8029b8a046840a43572ac9c006c6c8f55d2b096e /gcc/dwarf2out.c
parentf0620a215a807d40102f6165c6002a94b4bc283e (diff)
downloadgcc-b11e16d5eacc6bee8aa7ea50be5f2b3f95581b4b.tar.gz
2011-12-19 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 182471 using svnmerge git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@182472 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 768ecaf6669..d5f469c095c 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -18842,8 +18842,9 @@ gen_type_die_with_usage (tree type, dw_die_ref context_die,
/* Use the DIE of the containing namespace as the parent DIE of
the type description DIE we want to generate. */
- if (DECL_CONTEXT (TYPE_NAME (type))
- && TREE_CODE (DECL_CONTEXT (TYPE_NAME (type))) == NAMESPACE_DECL)
+ if (DECL_FILE_SCOPE_P (TYPE_NAME (type))
+ || (DECL_CONTEXT (TYPE_NAME (type))
+ && TREE_CODE (DECL_CONTEXT (TYPE_NAME (type))) == NAMESPACE_DECL))
context_die = get_context_die (DECL_CONTEXT (TYPE_NAME (type)));
TREE_ASM_WRITTEN (type) = 1;