[Bug target/44632] New: [4.4/4.5/4.6 regression] wrong code for complex division

doko at ubuntu dot com gcc-bugzilla@gcc.gnu.org
Tue Jun 22 13:58:00 GMT 2010


[forwarded from http://bugs.debian.org/585925]

seen with current 4.5 and 4.5 branches, and trunk

g++-4.4 miscompiles complex division:

(sid)jwilk@paer:~$ cat test.cxx 
#include <complex>
#include <iostream>

void f(std::complex<double> x)
{
     std::cout << x << std::endl;
     x = 1.0 / x;
     std::cout << x << std::endl;
}

int main()
{
     f(2.0);
}

(sid)jwilk@paer:~$ g++-4.3 -Wall test.cxx && ./a.out
(2,0)
(0.5,0)

(sid)jwilk@paer:~$ g++-4.4 -Wall test.cxx && ./a.out
(2,0)
(1,0)


-- 
           Summary: [4.4/4.5/4.6 regression] wrong code for complex division
           Product: gcc
           Version: 4.4.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: doko at ubuntu dot com
GCC target triplet: hppa-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44632



More information about the Gcc-bugs mailing list