diff options
author | Richard Guenther <rguenther@suse.de> | 2010-10-15 10:56:13 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2010-10-15 10:56:13 +0000 |
commit | 7a1a20d1c9b86e41a464137a797c8892d461e796 (patch) | |
tree | 0fa130260efa82ec6d36f85155bf82636ae16a9c /gcc/tree.c | |
parent | 977647538d9778f9758d14629653bfab8fb122db (diff) | |
download | gcc-7a1a20d1c9b86e41a464137a797c8892d461e796.zip gcc-7a1a20d1c9b86e41a464137a797c8892d461e796.tar.gz gcc-7a1a20d1c9b86e41a464137a797c8892d461e796.tar.bz2 |
re PR tree-optimization/45957 (g++.dg/ext/fnname3.C FAILs with -flto/-fwhopr)
2010-10-15 Richard Guenther <rguenther@suse.de>
PR lto/45957
* tree.c (free_lang_data_in_decl): Do not clear DECL_INITIAL
of vars.
* g++.dg/lto/20101014-1_0.C: New testcase.
From-SVN: r165502
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 16 |
1 files changed, 0 insertions, 16 deletions
@@ -4478,22 +4478,6 @@ free_lang_data_in_decl (tree decl) if (DECL_NAME (decl)) TREE_TYPE (DECL_NAME (decl)) = NULL_TREE; - if (TREE_CODE (decl) == VAR_DECL) - { - tree context = DECL_CONTEXT (decl); - - if (context) - { - enum tree_code code = TREE_CODE (context); - if (code == FUNCTION_DECL && DECL_ABSTRACT (context)) - { - /* Do not clear the decl context here, that will promote - all vars to global ones. */ - DECL_INITIAL (decl) = NULL_TREE; - } - } - } - free_lang_data_in_one_sizepos (&DECL_SIZE (decl)); free_lang_data_in_one_sizepos (&DECL_SIZE_UNIT (decl)); if (TREE_CODE (decl) == FIELD_DECL) |