From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25538 invoked by alias); 7 Dec 2003 14:17:11 -0000 Mailing-List: contact fortran-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: fortran-owner@gcc.gnu.org Received: (qmail 25529 invoked from network); 7 Dec 2003 14:17:07 -0000 From: Paul Brook To: "S. Bosscher" , "'toon@moene.indiv.nluug.nl'" , "'paul@codesourcery.com'" Subject: Re: Date: Sun, 07 Dec 2003 14:17:00 -0000 User-Agent: KMail/1.5.4 Cc: "'fortran@gcc.gnu.org'" References: <4195D82C2DB1D211B9910008C7C9B06F01F373E0@lr0nt3.lr.tudelft.nl> In-Reply-To: <4195D82C2DB1D211B9910008C7C9B06F01F373E0@lr0nt3.lr.tudelft.nl> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200312071417.05331.paul@codesourcery.com> X-SW-Source: 2003-12/txt/msg00039.txt.bz2 On Sunday 07 December 2003 1:47 pm, S. Bosscher wrote: > > > Implementing ASSIGN probably comes under this category as well. > > > > This would go into the g77 compatibility department ? > > Yes. > > It's also in the top 5 of my TODO list, as you know, since we > also need it to be able to compile SPEC ;-) In that case, you might want to consider not using computed gotos (in the C sense) to implement this. I'm of the opinion that it would be better to translate assigned gotos into select with normal gotos. All assigned goto labels must be within the same program unit as the label. It should be fairly easy to build an indexed list of targets, and use the index as the assigned value and the consdition for the switch. I haven't actually done any bechmarks, but I would expect the optimizers to translate this into code at least as good as using a [C] computed goto. It avoids problems on machines where sizeof (void*) > KIND(0), and allows us to take advantage of statements like GOTO foo (100, 200) Paul