[Bug target/57516] New: [avr] Incorrect fixed-point rounding result in the overflow case
gjl at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jun 3 16:17:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57516
Bug ID: 57516
Summary: [avr] Incorrect fixed-point rounding result in the
overflow case
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: gjl at gcc dot gnu.org
CC: eric.weddington at atmel dot com
Target: avr
ISO/IEC TR 18037 writes on the roundfx rounding functions:
2.1.7.2 The fixed-point rounding functions
[...] The rounding applied is to-nearest, with unspecified rounding direction
in the halfway case. Fractional bits beyond the rounding point are set to zero
in the result. If the exact result value cannot be represented, the saturated
result value is returned.
Currently, bits beyond the rounding point are always cleared, no matter whether
or not the intermediate result is representable or not.
More information about the Gcc-bugs
mailing list