Silverfrost Forums

Welcome to our forums

Wrong result with /64 /opt, module variable used as DO index

22 Feb 2024 7:57 #31136

When the following program is built with /64 /opt and run, the result is wrong -- a zero is printed instead of 34^2 = 1156.

module imod_m
   implicit none
   integer idir
end module

program tst
   use imod_m
   implicit none
   integer j, k
   do idir=1,10     ! Module variable used as DO index variable
      j = idir*3+4
      k = j*j
   end do
   print *,k
end program
23 Feb 2024 7:36 #31141

mecej4

Many thanks for the feedback. The failure relates to optimisation number 30. I have made a note of this.

23 Feb 2024 10:06 #31142

This failure has now been fixed for the next release of FTN95.

Please login to reply.