aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorAndrew Pinski <apinski@cavium.com>2011-12-01 17:13:05 +0000
committerAndrew Pinski <pinskia@gcc.gnu.org>2011-12-01 09:13:05 -0800
commitfdb415fe091cf23d7e816d72de95a0c40e47380d (patch)
tree18b93c40064feecb6ebfacdcf0d558ec268386c3 /gcc/tree.c
parent17dcf075813b6ac6edc5f59ccde8cff5a2b86182 (diff)
downloadgcc-fdb415fe091cf23d7e816d72de95a0c40e47380d.zip
gcc-fdb415fe091cf23d7e816d72de95a0c40e47380d.tar.gz
gcc-fdb415fe091cf23d7e816d72de95a0c40e47380d.tar.bz2
re PR lto/51198 ([c++0x] [4.7 Regression] ICE with -flto and non-static data member initializers)
2011-12-01 Andrew Pinski <apinski@cavium.com> PR lto/51198 * tree.c (free_lang_data_in_decl): Clear FIELD_DECL's DECL_INITIAL also. 2011-12-01 Andrew Pinski <apinski@cavium.com> PR lto/51198 * g++.dg/torture/pr51198.C: New testcase. From-SVN: r181886
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 72603b5..4cadc7e 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -4651,7 +4651,8 @@ free_lang_data_in_decl (tree decl)
|| (decl_function_context (decl) && !TREE_STATIC (decl)))
DECL_INITIAL (decl) = NULL_TREE;
}
- else if (TREE_CODE (decl) == TYPE_DECL)
+ else if (TREE_CODE (decl) == TYPE_DECL
+ || TREE_CODE (decl) == FIELD_DECL)
DECL_INITIAL (decl) = NULL_TREE;
else if (TREE_CODE (decl) == TRANSLATION_UNIT_DECL
&& DECL_INITIAL (decl)