This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [Testsuite patch]: new fortran tests
Steve,
> This is already covered in real_do_1.f90.
Agree.
I was looking at the testcase real_do_1.f90 and thought of following
case,
program test_real_do
integer n
integer x
n=0
do x=0.0,10.0,0.1
n=n+1
end do
print *, "N is ", n
program test_real_do
$ gfortran test_real.f90
$ ./a.out
N is 0
In the above case, I think, the compiler should treat the 'DO' construct
as 'DO x=0,10,0' and give an error as 'Step expression in DO loop can
not be zero', right?
Thanks,
Uttam