Do not call streamer_read_hwi in a function call.
authorMartin Liska <mliska@suse.cz>
Wed, 15 Jan 2020 12:34:20 +0000 (13:34 +0100)
committerMartin Liska <mliska@suse.cz>
Wed, 15 Jan 2020 12:34:20 +0000 (13:34 +0100)
* ipa-profile.c (ipa_profile_read_edge_summary): Do not allow
2 calls of streamer_read_hwi in a function call.

gcc/ChangeLog
gcc/ipa-profile.c

index 8ef85773d7a636315366055261596b6bd7a3a547..a9dc5142f838027addb9f3499d96529d0bab10c8 100644 (file)
@@ -1,3 +1,8 @@
+2020-01-15  Martin Liska  <mliska@suse.cz>
+
+       * 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  <rguenther@suse.de>
 
        * alias.c (record_alias_subset): Avoid redundant work when
index fc231c916b78e2455cbdc1bbccb01f3cc3c3c2ac..03272f2098766b25f03051eca4cfd643fb7c43c3 100644 (file)
@@ -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);
   }
 }