From 84a3effa1a22f46a145f373461eaccf0d4585587 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Wed, 15 Jan 2020 13:34:20 +0100 Subject: [PATCH] Do not call streamer_read_hwi in a function call. * ipa-profile.c (ipa_profile_read_edge_summary): Do not allow 2 calls of streamer_read_hwi in a function call. --- gcc/ChangeLog | 5 +++++ gcc/ipa-profile.c | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8ef85773d7a..a9dc5142f83 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2020-01-15 Martin Liska + + * ipa-profile.c (ipa_profile_read_edge_summary): Do not allow + 2 calls of streamer_read_hwi in a function call. + 2020-01-15 Richard Biener * alias.c (record_alias_subset): Avoid redundant work when diff --git a/gcc/ipa-profile.c b/gcc/ipa-profile.c index fc231c916b7..03272f20987 100644 --- a/gcc/ipa-profile.c +++ b/gcc/ipa-profile.c @@ -451,8 +451,9 @@ ipa_profile_read_edge_summary (class lto_input_block *ib, cgraph_edge *edge) for (i = 0; i < len; i++) { - speculative_call_target item (streamer_read_hwi (ib), - streamer_read_hwi (ib)); + unsigned int target_id = streamer_read_hwi (ib); + int target_probability = streamer_read_hwi (ib); + speculative_call_target item (target_id, target_probability); csum->speculative_call_targets.safe_push (item); } } -- 2.30.2