!!- ! Author: Brian Tiffin ! Dedicated to the public domain ! ! Date: November 2016 ! Modified: 2016-11-29/05:34-0500 ! ! Tectonics: ! gfortran -ffree-form -o tightloop-fortran tightloop-fortran.f !!+ ! sum of values from 0 to 16777216 program tightloop use iso_fortran_env implicit none integer :: i integer(kind=int64) :: total total = 0 do i=0,2**24 total = total + i end do print *,total end program tightloop