re PR lto/48538 (profiled LTO bootstrap failure with Ada)
authorEric Botcazou <ebotcazou@gcc.gnu.org>
Sun, 17 Apr 2011 14:57:14 +0000 (14:57 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Sun, 17 Apr 2011 14:57:14 +0000 (14:57 +0000)
PR lto/48538
* lto-cgraph.c (merge_profile_summaries): Check that lto_file_data
is non-null before accessing it.
(input_cgraph): Remove trailing spaces.

From-SVN: r172611

gcc/ChangeLog
gcc/lto-cgraph.c

index 73f304d07885854975519b6a026513181d392f94..4af4017c8966a6de3d4952e60978ab5ba0b66dc8 100644 (file)
@@ -1,3 +1,10 @@
+2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
+
+       PR lto/48538
+       * lto-cgraph.c (merge_profile_summaries): Check that lto_file_data
+       is non-null before accessing it.
+       (input_cgraph): Remove trailing spaces.
+
 2011-04-17  Revital Eres  <revital.eres@linaro.org>
 
        * params.def (sms-min-sc): New param flag.
@@ -69,9 +76,9 @@
        (estimate_growth): Fix handlig of non-trivial self recursion.
        (inline_read_summary): Do not read info->disregard_inline_limits.
        (inline_write_summary): Do not write info->disregard_inline_limits.
-       * tree-inline.c (inline_forbidden_into_p, tree_can_inline_p): Remove and
-       move all checks into can_inline_edge_p predicate; re-enable code comparing
-       optimization levels.
+       * tree-inline.c (inline_forbidden_into_p, tree_can_inline_p): Remove
+       and move all checks into can_inline_edge_p predicate; re-enable code
+       comparing optimization levels.
        (expand_call_inline): Do not test inline_forbidden_into_p.
        * Makefile.in (ipa-inline.o): Update arguments.
 
index 861a37b55a1fb8c50fcadb8c728028b3a08654b1..7f0910b0e879b7b186eff29b51116c2623b928c4 100644 (file)
@@ -1463,7 +1463,8 @@ merge_profile_summaries (struct lto_file_decl_data **file_data_vec)
      During LTRANS we already have values of count_materialization_scale
      computed, so just update them.  */
   for (node = cgraph_nodes; node; node = node->next)
-    if (node->local.lto_file_data->profile_info.runs)
+    if (node->local.lto_file_data
+       && node->local.lto_file_data->profile_info.runs)
       {
        int scale;
 
@@ -1535,8 +1536,8 @@ input_cgraph (void)
       VEC_free (cgraph_node_ptr, heap, nodes);
       VEC_free (varpool_node_ptr, heap, varpool);
     }
+
   merge_profile_summaries (file_data_vec);
-    
 
   /* Clear out the aux field that was used to store enough state to
      tell which nodes should be overwritten.  */