aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 3989a9b..c90331c 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -4633,7 +4633,8 @@ free_lang_data_in_decl (tree decl)
if (TREE_CODE (decl) == FIELD_DECL)
{
free_lang_data_in_one_sizepos (&DECL_FIELD_OFFSET (decl));
- DECL_QUALIFIER (decl) = NULL_TREE;
+ if (TREE_CODE (DECL_CONTEXT (decl)) == QUAL_UNION_TYPE)
+ DECL_QUALIFIER (decl) = NULL_TREE;
}
if (TREE_CODE (decl) == FUNCTION_DECL)