> > The standard says SAVE without entity list covers all
> > variables in the current scoping unit. I assume the body of a module
> > routine is part of the scoping unit, so j would be saved in this case.
>
> Incorrect assumption. The scoping unit of a module does not cover the
> interior parts of the module procedures.
Thank you, that's what I wanted to hear! What led me to this conclusion
was the fact that module variables are visible inside module routines.
I stand corrected.
> Of course, omitting SAVE doesn't force a local variable to be automatic unless
> - it is an automatic array
> or
> - the routine is declared as RECURSIVE.
>
> ...but this probably makes no difference to you anyway.
OpenMP compliant compilers take care of that (i.e. non-saved local variables
in routines called from within a parallel construct are guaranteed to be
private).
Thanks,
Herbert
--
******************************************************
* Herbert Fruchtl Tel.: +44-(0)20-8606-4650 *
* FECIT Fax: +44-(0)20-8606-4422 *
* 2 Longwalk Road email: [log in to unmask] *
* Stockley Park *
* Uxbridge UB11 1AB, United Kingdom *
******************************************************
|