This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/19609] New: real and imaginary part interchanged when flags_complex_divide_method=1
- From: "Thomas dot Koenig at online dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Jan 2005 19:57:30 -0000
- Subject: [Bug middle-end/19609] New: real and imaginary part interchanged when flags_complex_divide_method=1
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
I've bootstrapped a gcc tree with the fix for PR 19486 and
flags_complex_divide_method=1 , and found that the code now
confuses the real and complex parts for divisions in certain
cases.
Here's an example:
$ cat complex-a.c
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <complex.h>
int main()
{
complex float a,b,c;
a = I;
b = I;
c = a/b;
printf("%f + %f*I\n",crealf(c),cimagf(c));
return 0;
}
$ gcc complex-a.c
$ ./a.out
0.000000 + 1.000000*I
--
Summary: real and imaginary part interchanged when
flags_complex_divide_method=1
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: Thomas dot Koenig at online dot de
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19609