This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/29293] New: Darwin PPC float to integer conversion bug
- From: "howarth at nitro dot med dot uc dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Sep 2006 23:31:39 -0000
- Subject: [Bug target/29293] New: Darwin PPC float to integer conversion bug
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The fp-int-convert-timode testcase fails at all optimization levels
using -m64 on Darwin PPC. The failures are not due to the long
or long double sections of the testcase but rather the float section.
I was able to reduce this to smaller testcase by reducing the
fp-int-convert-timode testcase to calls to...
TEST_I_F(TItype, UTItype, float, FLT_MANT_DIG)
which then only calls one of the six possible failing tests...
TEST_I_F_VAL (I, F, HVAL0S (P, I) + 1, P_OK (P, I));
This shortened testcase, when processed with -E in gcc, can be
recasted as the expanded macros as the fp_int_convert_testcase.c
testcase where I have replaced the abort() call with a printf().
This test compiled at -m64 on Darwin PPC produces the output...
fv1 85070601871439417691678863831567695872.000000 fv2
85070591730234615865843651857942052864.000000 ivin 1 ivout 0
which compares to the correct result obtained on Linux x86_64
(with the printf() placed after the if statement) of...
fv1 85070601871439417691678863831567695872.000000 fv2
85070601871439417691678863831567695872.000000 ivin 1 ivout 0
Interestingly, if I take the fp_int_convert_testcase.c.f testcase and
compile it at -m64 with gcc 4.1.1 on x86_64, I get the same results
as what we currently get in gcc trunk on Darwin PPC. This makes
me think that the fix already resides in gcc trunk but has not be
expanded to include Darwin PPC.
--
Summary: Darwin PPC float to integer conversion bug
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: howarth at nitro dot med dot uc dot edu
GCC build triplet: powerpc-apple-darwin8
GCC host triplet: powerpc-apple-darwin8
GCC target triplet: powerpc-apple-darwin8
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29293