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;