public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-2774] Fix profile_count::to_sreal_scale
@ 2023-07-26  6:59 Jan Hubicka
  0 siblings, 0 replies; only message in thread
From: Jan Hubicka @ 2023-07-26  6:59 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:645c67f80c6258c1f54ec567f604008adbdb8a04

commit r14-2774-g645c67f80c6258c1f54ec567f604008adbdb8a04
Author: Jan Hubicka <jh@suse.cz>
Date:   Wed Jul 26 08:59:23 2023 +0200

    Fix profile_count::to_sreal_scale
    
    gcc/ChangeLog:
    
            * profile-count.cc (profile_count::to_sreal_scale): Value is not know
            if we divide by zero.

Diff:
---
 gcc/profile-count.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/profile-count.cc b/gcc/profile-count.cc
index 2c07ebc5942..eaf0f0d787e 100644
--- a/gcc/profile-count.cc
+++ b/gcc/profile-count.cc
@@ -345,7 +345,7 @@ profile_count::to_sreal_scale (profile_count in, bool *known) const
       return 1;
     }
   if (known)
-    *known = true;
+    *known = in.m_val != 0;
   if (*this == in)
     return 1;
   gcc_checking_assert (compatible_p (in));

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-07-26  6:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-26  6:59 [gcc r14-2774] Fix profile_count::to_sreal_scale Jan Hubicka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).