]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix profile_count::to_sreal_scale
authorJan Hubicka <jh@suse.cz>
Wed, 26 Jul 2023 06:59:23 +0000 (08:59 +0200)
committerJan Hubicka <jh@suse.cz>
Wed, 26 Jul 2023 06:59:23 +0000 (08:59 +0200)
gcc/ChangeLog:

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

gcc/profile-count.cc

index 2c07ebc59428bbc1273541fab34e7749cf0f1b05..eaf0f0d787e6abf6206d179f8c8519ae5355c2ee 100644 (file)
@@ -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));