This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: SIMPLE: A language-independent tree IR
- From: Toon Moene <toon at moene dot indiv dot nluug dot nl>
- To: Joe Buck <jbuck at synopsys dot COM>
- Cc: Richard Henderson <rth at redhat dot com>, "Joseph S. Myers" <jsm28 at cam dot ac dot uk>, Diego Novillo <dnovillo at redhat dot com>, gcc at gcc dot gnu dot org
- Date: Thu, 03 Jan 2002 02:05:32 +0100
- Subject: Re: SIMPLE: A language-independent tree IR
- Organization: Moene Computational Physics, Maartensdijk, The Netherlands
- References: <200201030036.QAA10312@atrus.synopsys.com>
Joe Buck wrote:
> The sequence points form a strict time order. Given sequence points
> S1,S2,S3 all external side effects (e.g. volatile reads and writes;
> calls to external functions we don't fully understand) between S1 and
> S2 have to be completed before any side effects between S2 and S3 start.
> But then, the proposed low-level form will have the existing C statements
> together with the simple triples, so I guess sequence points are like
> statements.
>
> With Fortran's parentheses, everything inside the parentheses has to be
> treated as one expression, we can't transform it in ways that violate
> this, but there's no requirements on the time order; we can interleave
> evaluations if we want. Maybe nothing is needed for this in the "low
> level tree" code at all, if the rule is used that no transformations that
> alter the results are allowed.
Thanks, Joe. I was persuing this thread because I am searching for
arguments that having VOLATILE in the Fortran Standard (upcoming Fortran
200X) is a sure-fire wrong thing. "volatile" in the C Standard very
much depends on the definition of "sequence point".
The problem is that the Fortran language doesn't have any concept of
time order, something that's necessary for `volatile' being useful.
Fortran tends to "define side effects away": If something might have a
side effect, you're not allowed to depend on it. Doesn't sound like a
good basis for using `volatile'.
--
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
Join GNU Fortran 95: http://g95.sourceforge.net/ (under construction)