can anyone check this code

Steve Kargl sgk@troutmask.apl.washington.edu
Fri Nov 11 17:42:00 GMT 2005


On Fri, Nov 11, 2005 at 09:34:32AM -0800, Uttam Pawar wrote:
> Hi,
> 
> Following code compiles fine with gfortran which I believe is invalid
> code.
> 
> $ cat do_4.f90
> 
> j = 0
> loop:  do 100 i = 1, 2
>     j = j + 1
> 100  continue
> end program
> 
> Any thoughts?
> 

NAG gives

kargl[207] f95 -o z a.f90
Error: a.f90, line 4: LOOP: DO 100 does not end with 100 ENDDO LOOP
       detected at CONTINUE@<end-of-statement>
[f95 terminated - errors found by pass 1]

http://www.lahey.com/check.htm gives

Compiling program unit main at line 1:
  1432-S: "SOURCE.F90", line 4, column 6: If DO construct name specified
  in a DO statement that is in a block DO construct, corresponding DO
  terminal statement must be an END DO statement specifying the same
  DO construct name.
Encountered 1 error, 0 warnings, 0 informations in file SOURCE.F90.

Please file a bug report.

-- 
Steve



More information about the Fortran mailing list