]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fix undefined behaviour in profile_count::differs_from_p
authorJan Hubicka <jh@suse.cz>
Thu, 10 Aug 2023 16:35:13 +0000 (18:35 +0200)
committerJan Hubicka <jh@suse.cz>
Thu, 10 Aug 2023 16:35:13 +0000 (18:35 +0200)
commite41103081bfa341bdb1037e94d6b8f7a0af39067
tree0f3397acf06d7c30871e9c84934920df29b9ed4e
parent8afe9d5d2fdd047cbd4e3531170af6b66d30e74a
Fix undefined behaviour in profile_count::differs_from_p

This patch avoid overflow in profile_count::differs_from_p and also makes it to
return false from one of the values is undefined while other is defined.

gcc/ChangeLog:

* profile-count.cc (profile_count::differs_from_p): Fix overflow and
handling of undefined values.
gcc/profile-count.cc