aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2023-07-26 08:59:23 +0200
committerJan Hubicka <jh@suse.cz>2023-07-26 08:59:23 +0200
commit645c67f80c6258c1f54ec567f604008adbdb8a04 (patch)
tree7c48afa1d487f2bee37e1fab3d1f9cc18eb8398f /gcc
parent9fdbd7d6fa5e0a76898dd66658934e3184111680 (diff)
downloadgcc-645c67f80c6258c1f54ec567f604008adbdb8a04.zip
gcc-645c67f80c6258c1f54ec567f604008adbdb8a04.tar.gz
gcc-645c67f80c6258c1f54ec567f604008adbdb8a04.tar.bz2
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.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/profile-count.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/profile-count.cc b/gcc/profile-count.cc
index 2c07ebc..eaf0f0d 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));