[Bug target/54347] New: REAL_VALUE_TO_TARGET_LONG_DOUBLE shouldn't be used in i386
hjl.tools at gmail dot com
gcc-bugzilla@gcc.gnu.org
Tue Aug 21 15:00:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54347
Bug #: 54347
Summary: REAL_VALUE_TO_TARGET_LONG_DOUBLE shouldn't be used in
i386
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: hjl.tools@gmail.com
CC: ubizjak@gmail.com
i386.c has
/* The __float80 type. */
float80_type_node = long_double_type_node;
if (TYPE_MODE (float80_type_node) != XFmode)
{
/* The __float80 type. */
float80_type_node = make_node (REAL_TYPE);
TYPE_PRECISION (float80_type_node) = 80;
layout_type (float80_type_node);
}
lang_hooks.types.register_builtin_type (float80_type_node, "__float80");
and
i386-interix.h:#undef LONG_DOUBLE_TYPE_SIZE
i386-interix.h:#define LONG_DOUBLE_TYPE_SIZE 64
long double may not be 80-bit. But i386.c has
case XFmode:
REAL_VALUE_TO_TARGET_LONG_DOUBLE (r, l);
parts[2] = gen_int_mode (l[2], SImode);
break;
It assumes long double is in XFmode. It should simply use
real_to_target (l, &r, mode);
instead of
REAL_VALUE_TO_TARGET_LONG_DOUBLE (r, l);
More information about the Gcc-bugs
mailing list