This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH][LTO] Fix PR40724
- From: Richard Guenther <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Diego Novillo <dnovillo at google dot com>
- Date: Sun, 19 Jul 2009 01:13:20 +0200 (CEST)
- Subject: [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);