summaryrefslogtreecommitdiff
path: root/gcc/lto-cgraph.c
diff options
context:
space:
mode:
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2011-04-17 14:57:14 +0000
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2011-04-17 14:57:14 +0000
commit30f589a58a21df8cf6b717a9f9e9f6f6f993b42b (patch)
treedd5c8d947f784754912daf7a0e53eb04ab7a91a9 /gcc/lto-cgraph.c
parent4f7f77aa3639a3f3021c893253e743265c3da383 (diff)
downloadgcc-30f589a58a21df8cf6b717a9f9e9f6f6f993b42b.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172611 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lto-cgraph.c')
-rw-r--r--gcc/lto-cgraph.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/lto-cgraph.c b/gcc/lto-cgraph.c
index 861a37b55a1..7f0910b0e87 100644
--- a/gcc/lto-cgraph.c
+++ b/gcc/lto-cgraph.c
@@ -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. */