aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-modref.c
diff options
context:
space:
mode:
authorRoger Sayle <roger@nextmovesoftware.com>2021-11-25 19:02:06 +0000
committerRoger Sayle <roger@nextmovesoftware.com>2021-11-25 19:02:06 +0000
commit6ea5fb3cc7f3cc9b731d72183c66c23543876f5a (patch)
tree2b5e6764bfe48e574083d57a5cfc6914717ffd7b /gcc/ipa-modref.c
parent9488d24206687be80443dafdb2cdfc4ff3aca28c (diff)
downloadgcc-6ea5fb3cc7f3cc9b731d72183c66c23543876f5a.zip
gcc-6ea5fb3cc7f3cc9b731d72183c66c23543876f5a.tar.gz
gcc-6ea5fb3cc7f3cc9b731d72183c66c23543876f5a.tar.bz2
PR middle-end/103406: Check for Inf before simplifying x-x.
This is a simple one line fix to the regression PR middle-end/103406, where x - x is being folded to 0.0 even when x is +Inf or -Inf. In GCC 11 and previously, we'd check whether the type honored NaNs (which implicitly covered the case where the type honors infinities), but my patch to test whether the operand could potentially be NaN failed to also check whether the operand could potentially be Inf. 2021-11-25 Roger Sayle <roger@nextmovesoftware.com> gcc/ChangeLog PR middle-end/103406 * match.pd (minus @0 @0): Check tree_expr_maybe_infinite_p. gcc/testsuite/ChangeLog PR middle-end/103406 * gcc.dg/pr103406.c: New test case.
Diffstat (limited to 'gcc/ipa-modref.c')
0 files changed, 0 insertions, 0 deletions