aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 561367b..8eeecff 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -4258,7 +4258,12 @@ free_lang_data_in_type (tree type)
TYPE_LANG_SLOT_1 (type) = NULL_TREE;
}
- TYPE_CONTEXT (type) = NULL_TREE;
+ if (debug_info_level < DINFO_LEVEL_TERSE
+ || (TYPE_CONTEXT (type)
+ && TREE_CODE (TYPE_CONTEXT (type)) != FUNCTION_DECL
+ && TREE_CODE (TYPE_CONTEXT (type)) != NAMESPACE_DECL))
+ TYPE_CONTEXT (type) = NULL_TREE;
+
if (debug_info_level < DINFO_LEVEL_TERSE)
TYPE_STUB_DECL (type) = NULL_TREE;
}