Hi,
this patch makes combine_with_ipa_count to return uninitialized when
called on uninitialized count. Previously in some cases it returned
IPA, which is probably not a big deal but it should not do that for
consistency.

Bootstrapped/regtested x86_64-linux, comitted.

        * profile-count.c (profile_count::combine_with_ipa_count): Return
        uninitialized count if called on ininitialized count.

Index: profile-count.c
===================================================================
--- profile-count.c     (revision 278814)
+++ profile-count.c     (working copy)
@@ -373,6 +376,8 @@ profile_count::adjust_for_ipa_scaling (p
 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;

Reply via email to