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

--- Comment #8 from H.J. Lu <hjl.tools at gmail dot com> 2011-09-28 15:54:09 
UTC ---
(In reply to comment #0)
> With the -O2 flag and in a very specialized circumstance, the product of a
> complex<double> and a double has the wrong sign.
> 
> The problem arises when the blitz++ array library is used.
> (http://www.oonumerics.org/blitz/) Unfortunately, I could not prune out all 
> the
> references to the unnecessary C++ standard libraries. The size of the .ii file
> is therefore pretty big. I hope the report will still be useful.
> 
> The output of the executable gcc_complex_bug should be
> 
> (-0.0,-1.0)x100.0=(0.0,100.0)
> 

I also got

(-0.0,-1.0)x100.0=(-0.0,-100.0)

with GCC 4.7.0 revision 179164.  Why should we get (0.0,100.0)?

Reply via email to