SIMPLE: A language-independent tree IR
Toon Moene
toon@moene.indiv.nluug.nl
Wed Jan 2 17:09:00 GMT 2002
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)
More information about the Gcc
mailing list