https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57371
--- Comment #11 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Roger Sayle <sa...@gcc.gnu.org>: https://gcc.gnu.org/g:030186cabe8128e752619e101768cf8823a42c38 commit r15-2132-g030186cabe8128e752619e101768cf8823a42c38 Author: Roger Sayle <ro...@nextmovesoftware.com> Date: Thu Jul 18 08:27:36 2024 +0100 Implement a -ftrapping-math/-fsignaling-nans TODO in match.pd. I've been investigating some (float)i == CST optimizations for match.pd, and noticed there's already a TODO comment in match.pd that's relatively easy to implement. When CST is a NaN, we only need to worry about exceptions with flag_trapping_math, and equality/inequality tests for sNaN only behave differently to qNaN with -fsignaling-nans. These issues are related to PR 57371 and PR 106805 in bugzilla. 2024-07-18 Roger Sayle <ro...@nextmovesoftware.com> gcc/ChangeLog * match.pd ((FTYPE) N CMP CST): Only worry about exceptions with flag_trapping_math, and about signaling NaNs with HONOR_SNANS. gcc/testsuite/ChangeLog * c-c++-common/pr57371-4.c: Update comment. * c-c++-common/pr57371-5.c: Add missing testcases from pr57371-4.c and update for -fno-signaling-nans -fno-trapping-math.