This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/47473] [4.5/4.6 Regression] Incorrect computation with complex numbers when using -std=c99
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 26 Jan 2011 13:43:01 +0000
- Subject: [Bug target/47473] [4.5/4.6 Regression] Incorrect computation with complex numbers when using -std=c99
- Auto-submitted: auto-generated
- References: <bug-47473-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47473
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-01-26 13:42:50 UTC ---
Unincluded testcase:
int
main (void)
{
long double _Complex w = 0.2L - 0.3iL;
w = w * (0.3L - (0.0F + 1.0iF) * 0.9L);
__builtin_printf("(0.2 - I*0.3)*(0.3 - I*0.9) = (%g, %g)\n", (double)
__real__ w, (double) __imag__ w);
return 0;
}
On x86_64-linux the results look correct.
Using
w = w * (0.3L - 0.9iL);
instead works too. And the results I get don't depend on libgcc version used
(4.4 behaves like 4.6).