Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 beta 3/9/83; site sdcrdcf.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxl!houxm!vax135!cornell!uw-beaver!tektronix!hplabs!sdcrdcf!pmontgom From: pmontgom@sdcrdcf.UUCP (Peter Montgomery) Newsgroups: net.lang.f77 Subject: User errors not detected by f77 Message-ID: <1284@sdcrdcf.UUCP> Date: Fri, 7-Sep-84 00:02:40 EDT Article-I.D.: sdcrdcf.1284 Posted: Fri Sep 7 00:02:40 1984 Date-Received: Mon, 3-Sep-84 09:37:44 EDT Reply-To: pmontgom@sdcrdcf.UUCP (Peter Montgomery) Organization: System Development Corporation, Santa Monica Lines: 63 C The SAVE statement in the main program references C a non-existent common block, and should cause a C compile time error. C Subroutine doif has a missing "end if". It gets a C misleading message about a branch to label 10 C from outside the block, and an undefined label C during assembly. C Subroutine test has conflicting uses of "a" C (dummy argument and symbolic constant). C The problems exist under both 4.1bsd and 4.2bsd. C On a larger version of subroutine test, 4.1bsd complained C "Out of memory" (the larger program was not C tried under 4.2bsd). C The program gets the following messages when compiled C with default options: C usererr.f: C MAIN s: C doif: C Warning on line 51 of usererr.f: there is a branch to label 10 from outside block C test: C Assembler: C "/tmp/fort12421.s", line 51: WARNING: brb: destination label is external C Undefined: C _y_ C L27 program s common /x/ x save /y/ end subroutine doif integer i, j, k do 10 i = 1, 20 if (i.gt.1) then j = 2 else j = 3 if (i.eq.j) then k = 1 else k = 2 end if 10 continue end subroutine test(a, b) integer a, b parameter(a=5) b = a end -- Peter Montgomery {akgua,allegra,bli,blix,bmcg,burdvax,cbosgd,csun,hplabs,hughes, ihnp4,ihnss,netvax,orstcs,parallax,randvax,sdccsu3,sdcnet,sdcsvax, slant45,trw-unix,ucla-s,ucla-vax}!sdcrdcf!pmontgom