This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[lto] Fix some fortran regressions
- From: Diego Novillo <dnovillo at google dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 14 Jul 2009 17:09:20 -0400
- Subject: [lto] Fix some fortran regressions
I was wrong when I thought TREE_BLOCKs were only attached to
DECL_INITIAL for current_function_decl. They are also reachable
from EXPRs embedded in some types emitted by Fortran.
These are pretty useless, so perhaps it'd be a good idea to clean
them up in Fortran's free_lang_data langhook, but letting them
through the streamer is harmless.
Tested on x86_64.
Diego.
* lto-streamer-out.c (lto_output_ts_block_tree_pointers):
Do not expect to be inside current_function_decl.
Index: lto-streamer-out.c
===================================================================
--- lto-streamer-out.c (revision 149625)
+++ lto-streamer-out.c (working copy)
@@ -1158,11 +1158,6 @@ lto_output_ts_block_tree_pointers (struc
unsigned i;
tree t;
- /* Lexical scopes are only emitted with their corresponding function
- body. Otherwise it makes no sense to emit the local variables
- and the tree of scopes. */
- gcc_assert (ref_p && current_function_decl);
-
lto_output_location (ob, BLOCK_SOURCE_LOCATION (expr));
lto_output_chain (ob, BLOCK_VARS (expr), ref_p);