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/56872] [4.8/4.9 Regression] Incorrect SUM evaluation, involving implied-do loop, with -ffrontend-optimize


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

--- Comment #4 from Tobias Burnus <burnus at gcc dot gnu.org> 2013-04-08 16:39:10 UTC ---
Front-end optimization generates for
  print *,SUM([(s**(REAL(k-1)/REAL(m-1)),k=1,m)])
the code:
   D.1918 = s;
   D.1919 = __builtin_powf (D.1918, (((real(kind=4)) (k + -1) / (real(kind=4))
(m + -1))));

Completely ignoring that "k" is a loop variable, which is not even set.


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