From b225a29b8ced82d88b0a2fa142cb071335d91fd3 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Thu, 28 Nov 2019 18:04:41 +0100 Subject: [PATCH] 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 --- gcc/ChangeLog | 5 +++++ gcc/profile-count.c | 2 ++ 2 files changed, 7 insertions(+) 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; -- 2.30.2