Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!pasteur!ucbvax!cevax.berkeley.edu!ao From: ao@cevax.berkeley.edu (A Ozselcuk) Newsgroups: comp.lang.fortran Subject: A Bug any Decent Compiler Would Catch, NO, NOT f77...... Message-ID: <22780@ucbvax.BERKELEY.EDU> Date: 29 Jan 88 08:48:21 GMT Sender: usenet@ucbvax.BERKELEY.EDU Reply-To: ao@cevax.berkeley.edu (A Ozselcuk) Distribution: na Organization: University of California, Berkeley Lines: 44 Keywords: f77, ULTRIX32 fort, WATFOR77, IBM-FORTRAN-FORTVS References: f77 does not catch the error in the following code program foo2 integer i, j, a(10,10) do 20 i = 1, 10 do 10 j = 1,10 i = i +1 a(i,j) = 0 10 continue 20 continue stop end The following compilers catch the error: ULTRIX fort ( Based on DEC-VAX VMS Fortran ) WATFOR77 (on IBM 3090) FORTVS or FORT22 (IBM`s own compilers on 3090) However, f77 catches the following error: program foo integer i, j, a(10,10) do 20 i = 1, 10 i = i +1 do 10 j = 1,10 a(i,j) = 0 10 continue 20 continue stop end and gets a standing ovation from me. If you want to flame, please DO NOT SEND IT THROUGH THE NEWS, e-mail will suffice. Akin Ozselcuk Experientia Docet ao@cevax.berkeley.edu "We Learn From Disasters " Motto of the Bidge Engineers