Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!ncar!acdpyr!pack From: pack@acdpyr.ucar.edu (Dan Packman) Newsgroups: comp.lang.fortran Subject: Re: Dubious Fortran Construct Summary: It should be illegal Keywords: branching doloops Message-ID: <1136@ncar.ucar.edu> Date: 14 Dec 88 22:40:19 GMT References: <22994@sgi.SGI.COM> <11800009@modcomp> Sender: news@ncar.ucar.edu Reply-To: pack@acdpyr.UCAR.EDU (Dan Packman) Followup-To: comp.lang.fortran Organization: Atmospheric Chemistry Division/NCAR, Boulder CO Lines: 22 I ran the following horrible code: K = 0 DO 10 I = 1,10 IF (I.EQ.1.OR.I.EQ.5) GOTO 10 DO 10 J = 1,10 IF (J.EQ.3) GOTO 10 10 K = K + 1 PRINT *,K END Results were: System K ======================================== Pyramid OSX4.0 80 SUN OS 4.0 92 VAX/VMS 4.7 92 CRAY COS1.15 [Warning notice from compiler, infinite loop generated] I think this particular case (with the numbered line not being a continuation) should be flagged illegal. "To every do loop, a continue" (or end do) Dan Packman NCAR INTERNET: pack@acdpyr.UCAR.EDU (303) 497-1427 P.O. Box 3000 CSNET: pack@ncar.CSNET Boulder, CO 80307 DECNET SPAN: 9.367::PACK