From: Jan Hubicka Date: Wed, 26 Jul 2023 06:59:23 +0000 (+0200) Subject: Fix profile_count::to_sreal_scale X-Git-Tag: basepoints/gcc-15~7365 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=645c67f80c6258c1f54ec567f604008adbdb8a04;p=thirdparty%2Fgcc.git 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 --git a/gcc/profile-count.cc b/gcc/profile-count.cc index 2c07ebc59428..eaf0f0d787e6 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));