aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-streamer.c
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2014-12-15 23:35:20 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2014-12-15 22:35:20 +0000
commit6c36539dcffceaff517f6682c08ea236a4c77e14 (patch)
tree6d7e7596b4e5e5b1571f88c420ce3de5d2a54ec6 /gcc/tree-streamer.c
parent2bf7560bd3757dbd0d7ffbe8e61b3eb847cfc5f0 (diff)
downloadgcc-6c36539dcffceaff517f6682c08ea236a4c77e14.zip
gcc-6c36539dcffceaff517f6682c08ea236a4c77e14.tar.gz
gcc-6c36539dcffceaff517f6682c08ea236a4c77e14.tar.bz2
re PR lto/64043 (ICE (segfault) with LTO: in tree_check/tree.h:2758 get_binfo_at_offset/tree.c:11914)
PR lto/64043 * gcc.dg/lto/20110201-1_0.c: New testcase. * tree-streamer.c (preload_common_nodes): Skip preloading of main_identifier_node, pid_type and optimization/option nodes. From-SVN: r218767
Diffstat (limited to 'gcc/tree-streamer.c')
-rw-r--r--gcc/tree-streamer.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/gcc/tree-streamer.c b/gcc/tree-streamer.c
index 102cb22..a4502bd 100644
--- a/gcc/tree-streamer.c
+++ b/gcc/tree-streamer.c
@@ -324,7 +324,18 @@ preload_common_nodes (struct streamer_tree_cache_d *cache)
/* Skip boolean type and constants, they are frontend dependent. */
if (i != TI_BOOLEAN_TYPE
&& i != TI_BOOLEAN_FALSE
- && i != TI_BOOLEAN_TRUE)
+ && i != TI_BOOLEAN_TRUE
+ /* MAIN_IDENTIFIER is not always initialized by Fortran FE. */
+ && i != TI_MAIN_IDENTIFIER
+ /* PID_TYPE is initialized only by C family front-ends. */
+ && i != TI_PID_TYPE
+ /* Skip optimization and target option nodes; they depend on flags. */
+ && i != TI_OPTIMIZATION_DEFAULT
+ && i != TI_OPTIMIZATION_CURRENT
+ && i != TI_TARGET_OPTION_DEFAULT
+ && i != TI_TARGET_OPTION_CURRENT
+ && i != TI_CURRENT_TARGET_PRAGMA
+ && i != TI_CURRENT_OPTIMIZE_PRAGMA)
record_common_node (cache, global_trees[i]);
}