[Testsuite patch]: new fortran tests

Uttam Pawar uttamp@us.ibm.com
Mon Nov 14 18:42:00 GMT 2005


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



More information about the Fortran mailing list