re PR lto/64043 (ICE (segfault) with LTO: in tree_check/tree.h:2758 get_binfo_at_offs...
authorJan Hubicka <hubicka@ucw.cz>
Mon, 15 Dec 2014 22:35:20 +0000 (23:35 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Mon, 15 Dec 2014 22:35:20 +0000 (22:35 +0000)
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

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/lto/20110201-1_0.c
gcc/tree-streamer.c

index 292997242564ece2f0bc2de8bc7d0f7b70ba11f3..a80221827eb33dfae4f8cad6f9399f3aeb5562d5 100644 (file)
@@ -1,3 +1,9 @@
+2014-12-15  Jan Hubicka  <hubicka@ucw.cz>
+
+       PR lto/64043
+       * tree-streamer.c (preload_common_nodes): Skip preloading
+       of main_identifier_node, pid_type and optimization/option nodes.
+
 2014-12-15  Vladimir Makarov  <vmakarov@redhat.com>
 
        PR rtl-optimization/63397
        * tree-ssa-threadupdate.c (duplicate_seme_region): Mark
        the loop for removal if we copied the loop header.
 
+2014-12-14  Jan Hubicka  <hubicka@ucw.cz>
+
+       PR ipa/61602
+       * cgraph.h (ipa_discover_readonly_nonaddressable_vars): Return bool.
+       * ipa.c (set_writeonly_bit): Track if reference was removed.
+       (ipa_discover_readonly_nonaddressable_vars): Return true if any
+       references was removed.
+       * ipa-reference.c (propagate): Return TODO_remove_functions if
+       reference was removed.
+
 2014-12-14  Jan Hubicka  <hubicka@ucw.cz>
 
        * ipa.c (process_references): Fix conditoinal on flag_optimize
index 2299c78e4279d08b17cd0449d4962641bd676e34..c4366d5cc5da029150e3d3c655b180328d1190e0 100644 (file)
@@ -1,3 +1,8 @@
+2014-12-15  Jan Hubicka  <hubicka@ucw.cz>
+
+       PR lto/64043
+       * gcc.dg/lto/20110201-1_0.c: New testcase.
+
 2014-12-15  Jakub Jelinek  <jakub@redhat.com>
 
        PR rtl-optimization/64316
index a006649286d1e53932eb51f686045a9c04771e24..5073a50fc52099d9a0d7013124b355dd3b00f2f7 100644 (file)
@@ -1,6 +1,5 @@
 /* { dg-lto-do run } */
 /* { dg-lto-options { { -O0 -flto } } } */
-/* { dg-extra-ld-options "-O2 -ffast-math -fuse-linker-plugin" } */
 /* { dg-require-linker-plugin "" } */
 
 /* We require a linker plugin because otherwise we'd need to link
@@ -9,7 +8,7 @@
    which does not have folded cabs.  */
 
 double cabs(_Complex double);
-double __attribute__((used))
+double __attribute__((used)) __attribute__ ((optimize ("O2,fast-math")))
 foo (_Complex double x, int b)
 {
   if (b)
index 102cb2256eaa638d925595e37c091fb03191e3b2..a4502bd2167c7c4d0e1118848837fb554992093a 100644 (file)
@@ -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]);
 }