[mpich-discuss] mpich2-1.0.7 file mpif.h and fortran compiler g95
Steve Kargl
sgk at troutmask.apl.washington.edu
Sat Oct 11 17:16:43 CDT 2008
On Sat, Oct 11, 2008 at 02:13:10PM -0700, Martin Siegert wrote:
> Surely this is not a mpich problem but a problem with the program
> that includes the blanket save statement. The Fortran standard is
> quite clear about this:
>
> "If a SAVE statement with an omitted saved entity list occurs in a scoping
> unit, no other explicit occurrence of the SAVE attribute or SAVE statement
> is permitted in the same scoping unit."
>
> Thus, this is not a problem related to g95 since it follows the standard
> (you could argue that the gfortran behaviour is actually incorrect).
gfortran's behavior is permitted by the standard. Under section 1.5,
A processor conforms to this standard if
....
(3) It contains the capability to detect and report the use within
a submitted program unit of an additional form or relationship
that is not permitted by the numbered syntax rules or constraints,
including the deleted features described in Annex B;
gfortran detects and reports that C570 (R543) has been violated. gfortran
simply tosses the duplicate save attribute and compiles the code. The
standard does not require the processor to abort compilation.
--
Steve
More information about the mpich-discuss
mailing list