diff options
author | Richard Guenther <rguenther@suse.de> | 2011-02-20 17:15:53 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2011-02-20 17:15:53 +0000 |
commit | 77f846e9e22eb9a71a0318bd49257d0f31292e56 (patch) | |
tree | 7292429daee4c43eb678339ca47cb4c5fd2dd891 /gcc/tree.c | |
parent | 6e549dd2e521e4deab694808be9d349aea892418 (diff) | |
download | gcc-77f846e9e22eb9a71a0318bd49257d0f31292e56.zip gcc-77f846e9e22eb9a71a0318bd49257d0f31292e56.tar.gz gcc-77f846e9e22eb9a71a0318bd49257d0f31292e56.tar.bz2 |
re PR target/47822 (Multiple test suite failures due to revision 170321)
2011-02-20 Richard Guenther <rguenther@suse.de>
PR lto/47822
* tree.c (free_lang_data_in_decl): Clean builtins from
the TU decl BLOCK_VARS.
From-SVN: r170339
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -4577,6 +4577,25 @@ free_lang_data_in_decl (tree decl) } else if (TREE_CODE (decl) == TYPE_DECL) DECL_INITIAL (decl) = NULL_TREE; + else if (TREE_CODE (decl) == TRANSLATION_UNIT_DECL + && DECL_INITIAL (decl) + && TREE_CODE (DECL_INITIAL (decl)) == BLOCK) + { + /* Strip builtins from the translation-unit BLOCK. We still have + targets without builtin_decl support and also builtins are + shared nodes and thus we can't use TREE_CHAIN in multiple + lists. */ + tree *nextp = &BLOCK_VARS (DECL_INITIAL (decl)); + while (*nextp) + { + tree var = *nextp; + if (TREE_CODE (var) == FUNCTION_DECL + && DECL_BUILT_IN (var)) + *nextp = TREE_CHAIN (var); + else + nextp = &TREE_CHAIN (var); + } + } } |