This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c/4346: wrong float multiply with Sparc
- To: gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, tassart at art dot alcatel dot fr
- Subject: Re: c/4346: wrong float multiply with Sparc
- From: aoliva at gcc dot gnu dot org
- Date: 29 Sep 2001 04:26:29 -0000
Synopsis: wrong float multiply with Sparc
State-Changed-From-To: open->closed
State-Changed-By: aoliva
State-Changed-When: Fri Sep 28 21:26:28 2001
State-Changed-Why:
GCC is correct, as far as the code you wrote goes. There's no reason to do the multiplication that outputs a double; in fact, this could even give incorrect results in case the algorithm depended on the multiplication being performed in float, and only then converted to double, which is what the code asks for. Perhaps if you convert the operands of the multiplication to double, GCC will do the multiplication the way you expect.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=4346&database=gcc