[Bug target/47473] [4.5/4.6 Regression] Incorrect computation with complex numbers when using -std=c99
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jan 26 14:13:00 GMT 2011
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).
More information about the Gcc-bugs
mailing list