[Patch, gfortran] PR22304, 17917, 16511, 18870 and 23270 - modules,equivalences and commons

Paul Thomas paulthomas2@wanadoo.fr
Mon Aug 22 19:09:00 GMT 2005


Richard,

>
> I get the feeling that perhaps an important bit in the standard got 
> overlooked here, though, because the above quote has absolutely 
> nothing to do with this code. The EQUIVALENCE statement above does not 
> have anything to do with any entities in any common blocks. See 
> 14.6.1.3(7) in f95. By that condition, the "a" referred to in the 
> equivalence statement is not the "a" that is in the common block. 
> Instead it is a local variable to the internal procedure bar; it 
> blocks host association of the "a" from the main program.

That is what I took the quoted section to mean.  I agree that the 
example is not hygenic but I think that it is correct.  I also agree 
with your last sentence above, since the common block is not declared in 
the scoping unit of the equivalence.  The potential out-of-scope 
association, referred to in 14.6.3.3, is via a potential common block in 
the same scope as the equivalence.

Paul T

PS Richard, I cannot reply to you directly because your server seems to 
object to my ISP.



More information about the Fortran mailing list