[LLVMbugs] [Bug 1804] New: APFloat wrong handling of smallest normalized positive 32 bit float
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Fri Nov 16 03:57:43 PST 2007
http://llvm.org/bugs/show_bug.cgi?id=1804
Summary: APFloat wrong handling of smallest normalized positive
32 bit float
Product: new-bugs
Version: unspecified
Platform: Other
OS/Version: Linux
Status: NEW
Severity: enhancement
Priority: P2
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: baldrick at free.fr
CC: llvmbugs at cs.uiuc.edu
Here's a C testcase showing the problem (originally spotted in the
Ada testsuite):
float F(void) {
const int i = 8388608;
const float f = *(float *)&i;
return f;
}
$ llvm-gcc -S -O4 af.c
->
define float @F() pure {
entry:
ret float 0.000000e+00
}
The float has become zero, but 8388608 = 2^23 corresponds to
2^(-126), the smallest positive normalized float, and is non-zero.
It is also output as zero in the final assembler:
.long 0 # float 0
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list