From 645c67f80c6258c1f54ec567f604008adbdb8a04 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Wed, 26 Jul 2023 08:59:23 +0200 Subject: [PATCH] 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. --- 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));