Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!mordor!sri-spam!rutgers!uwvax!oddjob!gargoyle!ihnp4!ttrdc!levy From: levy@ttrdc.UUCP (Daniel R. Levy) Newsgroups: comp.lang.fortran Subject: Re: A Bug any Decent Compiler Would Catch, NO, NOT f77...... Message-ID: <2139@ttrdc.UUCP> Date: 31 Jan 88 03:32:59 GMT References: <22780@ucbvax.BERKELEY.EDU> Distribution: na Organization: AT&T, Skokie, IL Lines: 39 Keywords: f77, ULTRIX32 fort, WATFOR77, IBM-FORTRAN-FORTVS Summary: oh YEAH?!?!? In article <22780@ucbvax.BERKELEY.EDU>, ao@cevax.berkeley.edu (A Ozselcuk) writes: # 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 I tried this little ditty on a SYSTEM V f77 compiler: $ uname -a ttrdc ttrdc 2.0v3 1208 3B-20S $ cat foo2.f 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 $ f77 -c foo2.f foo2.f: MAIN foo2: Error on line 5 of foo2.f: redefinition of do variable Error. No assembly. -- |------------Dan Levy------------| Path: ..!{akgua,homxb,ihnp4,ltuxa,mvuxa, | an Engihacker @ | }!ttrdc!ttrda!levy | AT&T Computer Systems Division | Disclaimer? Huh? What disclaimer??? |--------Skokie, Illinois--------|