[Bug tree-optimization/107046] New: [13 Regression] Recent FP range work causing inf-2 to be miscompiled on rx-elf
jeffreyalaw at gmail dot com
gcc-bugzilla@gcc.gnu.org
Mon Sep 26 23:44:30 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107046
Bug ID: 107046
Summary: [13 Regression] Recent FP range work causing inf-2 to
be miscompiled on rx-elf
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: jeffreyalaw at gmail dot com
Target Milestone: ---
gcc.c-torture/execute/ieee/inf-2.c is being mis-compiled as of:
commit b7fd7fb5011106c062df9275ca8fddcbce4ebdeb
Author: Aldy Hernandez <aldyh@redhat.com>
Date: Thu Sep 22 18:20:39 2022 +0200
frange: drop endpoints to min/max representable numbers for
-ffinite-math-only.
Similarly to how we drop NANs to UNDEFINED when -ffinite-math-only, I
think we can drop the numbers outside of the min/max representable
numbers to the representable number.
This means the endpoings to VR_VARYING for -ffinite-math-only can now
be the min/max representable, instead of -INF and +INF.
Saturating in the setter means that the upcoming implementation for
binary operators no longer have to worry about doing the right
thing for -ffinite-math-only. If the range goes outside the limits,
it'll get chopped down.
Looking at the assembly code, test, testf and testl are all collapsing down to
calls to abort.
.file "k.c"
.section P,"ax"
.section .text.unlikely,"ax",@progbits
.global _test
.type _test, @function
_test:
bsr _abort
.size _test, .-_test
.global _testf
.type _testf, @function
_testf:
bsr _abort
.size _testf, .-_testf
.global _testl
.type _testl, @function
_testl:
bsr _abort
.size _testl, .-_testl
.global _main
.type _main, @function
_main:
bsr _abort
.size _main, .-_main
.ident "GCC: (GNU) 13.0.0 20220923 (experimental)"
More information about the Gcc-bugs
mailing list