http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56872
Mikael Morin <mikael at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED CC| |mikael at gcc dot gnu.org Resolution|FIXED | --- Comment #10 from Mikael Morin <mikael at gcc dot gnu.org> 2013-04-10 16:09:38 UTC --- > - if (c == NULL) > + /* Don't do any simplififcation if we have > + - no element in the constructor or > + - only have a single element in the array which contains an > + iterator. */ > + > + if (c == NULL || (c->iterator != NULL && gfc_constructor_next (c) == NULL)) > return 0; > I don't think it is enough if there is something after the iterator. Testcase: real :: s integer :: m integer :: k m = 2 s = 1000. print *,[(s**(REAL(k-1)/REAL(m-1)),k=1,m)] print *,SUM([(s**(REAL(k-1)/REAL(m-1)),k=1,m), 0.0]) end program sum_bug