------- Comment #7 from pcarlini at suse dot de  2006-09-06 20:23 -------
Both the front-ends deal with 0 * -1 in the same way, the result is -0 (just
try). Anyway, the issue is crazy, a reduced pure C testcase (in principle
identical to what the complex<double> class does) behaves exactly the other way
'round about -O0 vs -O1:

#include <stdio.h>

int main()
{
  double __complex__ z;

  __real__ z = 1.0;
  __imag__ z = 0.0;

  z *= -1.0;

  printf("%e\n", __imag__(z));
}

I can't believe that both 0 and -0 are correct...


-- 


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

Reply via email to