From: Jan Hubicka Date: Thu, 28 Nov 2019 17:04:41 +0000 (+0100) Subject: profile-count.c (profile_count::combine_with_ipa_count): Return uninitialized count... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b225a29b8ced82d88b0a2fa142cb071335d91fd3;p=gcc.git profile-count.c (profile_count::combine_with_ipa_count): Return uninitialized count if called on ininitialized count. * profile-count.c (profile_count::combine_with_ipa_count): Return uninitialized count if called on ininitialized count. From-SVN: r278815 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 87732c84850..b85bda2c02a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-11-28 Jan Hubicka + + * profile-count.c (profile_count::combine_with_ipa_count): Return + uninitialized count if called on ininitialized count. + 2019-11-28 Jan Hubicka * ipa-inline-transform.c (inline_transform): Scale profile before diff --git a/gcc/profile-count.c b/gcc/profile-count.c index e91f9cbd26d..fb978c634fd 100644 --- a/gcc/profile-count.c +++ b/gcc/profile-count.c @@ -373,6 +373,8 @@ profile_count::adjust_for_ipa_scaling (profile_count *num, profile_count profile_count::combine_with_ipa_count (profile_count ipa) { + if (!initialized_p ()) + return *this; ipa = ipa.ipa (); if (ipa.nonzero_p ()) return ipa;