------- Comment #2 from rguenth at gcc dot gnu dot org 2007-11-15 10:21 ------- Confirmed. Shorter testcase:
#include <complex> #include <iostream> typedef std::complex<double> NumType; void multiply(NumType a, NumType b, unsigned ac, NumType &ab) { NumType s; for (unsigned j=0; j<ac; j++) s = a * b; ab = s; } int main() { NumType a(1,2), b(3,-2), c; multiply(a, b, 1, c); std::cout << c << std::endl; return 0; } Looks like another SRA problem. -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aoliva at gcc dot gnu dot | |org Status|UNCONFIRMED |NEW Component|c++ |tree-optimization Ever Confirmed|0 |1 Keywords| |wrong-code Known to fail| |4.3.0 Known to work| |4.2.2 Last reconfirmed|0000-00-00 00:00:00 |2007-11-15 10:21:31 date| | Summary|optimizer problem |[4.3 Regression] optimizer | |problem Target Milestone|--- |4.3.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34099