This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] Extension of SIMPLE for Fortran 95
- From: Diego Novillo <dnovillo at redhat dot com>
- To: "S. Bosscher" <S dot Bosscher at student dot tudelft dot nl>
- Cc: "'gcc at gcc dot gnu dot org'" <gcc at gcc dot gnu dot org>
- Date: Mon, 10 Jun 2002 10:48:24 -0400
- Subject: Re: [RFC] Extension of SIMPLE for Fortran 95
- Organization: Red Hat Canada
- References: <4195D82C2DB1D211B9910008C7C9B06F01F37285@lr0nt3.lr.tudelft.nl>
On Mon, 10 Jun 2002, S. Bosscher wrote:
> OUTER: DO I=...
> ...
> INNER: DO J=...
> ...
> IF (something) THEN
> CYCLE OUTER
> ELSE IF (something else) THEN
> EXIT OUTER
> ENDIF
> ...
> END DO INNER
> ...
>
> END DO OUTER
>
> We want to lower our parse tree to SIMPLE, but we can't represent this kind
> of CYCLE and EXIT statements in SIMPLE.
>
Maybe we shouldn't have to. Couldn't the above be modelled with
GOTOs? The way I'd rather handle it is to have the g95
simplifier deal with things like this.
The way to approach this is to think about converting the above
to RTL. If you can convert to RTL, then you can convert to
SIMPLE. You merely need to expose all the language-dependent
semantics.
Diego.