This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/31139] sum(w_re(1:nn,1)*fi(i(1:nn, ii))) up to 3.5x slower than C version



------- Comment #3 from pinskia at gcc dot gnu dot org  2007-03-12 05:33 -------
The problem here is obvious, in the Fortran case, there is a temp array being
created while in the C case, there is not.  Also in the optimized C case, the
multiplication of the complex numbers is incorrect unless you add -ffast-math. 
Actually I think in both C cases it is incorrect.  Can someone try with
-ffast-math for both the C and Fortran cases?


complex * complex is not a simple cross product in FP world.


-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]