This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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);
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]