https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87204
Bug ID: 87204
Summary: strtoflt128 produces different results for subnormals
with -m32 and -m64
Product: gcc
Version: 7.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libquadmath
Assignee: unassigned at gcc dot gnu.org
Reporter: barannikov88 at gmail dot com
Target Milestone: ---
The testcase:
#include <quadmath.h>
#include <stdio.h>
#include <inttypes.h>
int main ()
{
union {
__float128 f;
uint64_t i64[2];
} u = { .f = strtoflt128("1e-4941", NULL) };
printf("%016" PRIx64 " %016" PRIx64 "\n", u.i64[1], u.i64[0]);
}
$ gcc-7.3.0 t.c -lquadmath -lm -m32 && a.out
0000000000014707 e947d757fbf6f700
$ gcc-7.3.0 t.c -lquadmath -lm -m64 && a.out
0000000000014707 e946d257f2f674b9
The output is for x86-64, haven't tested for other platforms.