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]

[PATCH][LTO] Fix PR40724


This should fix most of the Fortran problems left.  The number of
common nodes streamed was out-of-sync because fortran only sets
main_identifier_node if there is a main program in the unit ...

Likely this also fixes PR40725.

I'll apply this as obvious if the bootstrap and regtest succeeds.

Richard.

2009-07-19  Richard Guenther  <rguenther@suse.de>

	PR lto/40724
	* lto-streamer.c (lto_get_common_nodes): Initialize
	main_identifier_node if it is not initialized already.

Index: gcc/lto-streamer.c
===================================================================
--- gcc/lto-streamer.c	(revision 149767)
+++ gcc/lto-streamer.c	(working copy)
@@ -705,6 +705,8 @@ lto_get_common_nodes (void)
       const char *main_name = IDENTIFIER_POINTER (main_identifier_node);
       gcc_assert (strcmp (main_name, "main") == 0);
     }
+  else
+    main_identifier_node = get_identifier ("main");
 
   gcc_assert (ptrdiff_type_node == integer_type_node);
 


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