🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.lang.f77
Article #364

Re: assign bug in f77

#364
From: Doug Gwyn
Date: Thu, 15 May 1986 04:06
30 lines
1500 bytes
Posted back in mid-1985:
> Description:
> 	The f77 VAX code generator creates illegal instructions ("cvtll")
> 	whenever the target of an 'assign' statement is an integer*2
> 	variable.
> 
> Repeat-by:
> 	Run the following program through the f77 compiler:
> 
> 	integer*2 i
> 	assign 10 to i
> 	goto i
> 10	continue
> 	end

I just got around to looking at this problem,
originally reported for VAX 4.2BSD f77, using
the VAX SVR2 f77.  It has a similar problem,
not in the code generator, but in the optimizer
(/lib/c2).  The optimizer removes the labeled
"ret" that is the target of the goto, because
it doesn't realize that the CVTLW (of the label
into a variable which is then indirectly jumped
through for the goto) is a label reference.
The CVTLL seems to be a Berkeley special..

ASSIGN moves a label, NOT an integer, into the
assign variable, which for that reason must
not be an INTEGER*2.  The compiler should,
however, have warned about this user error.
Technical Details
Message-ID: <861@brl-smoke.ARPA>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!brl-adm!brl-smoke!gwyn

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!brl-adm!brl-smoke!gwyn
From: gwyn@brl-smoke.ARPA (Doug Gwyn )
Newsgroups: net.lang.f77
Subject: Re: assign bug in f77
Message-ID: <861@brl-smoke.ARPA>
Date: Thu, 15-May-86 00:06:05 EDT
Article-I.D.: brl-smok.861
Posted: Thu May 15 00:06:05 1986
Date-Received: Sun, 25-May-86 11:41:57 EDT
Distribution: net
Organization: Ballistic Research Lab (BRL)
Lines: 30