[Patch, gfortran] PR22304, 17917, 16511, 18870 and 23270 - modules, equivalences and commons
Paul Thomas
paulthomas2@wanadoo.fr
Mon Aug 22 15:58:00 GMT 2005
- Previous message (by thread): [Patch, gfortran] PR22304, 17917, 16511, 18870 and 23270 - modules, equivalences and commons
- Next message (by thread): [Patch, gfortran] PR22304, 17917, 16511, 18870 and 23270 - modules,equivalences and commons
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Steven,
>>
>> What if the equivalenced sym is defined in the parent name space, or
>> is that impossible?
>>
14.6.3.3 "An EQUIVALENCE statement causes storage association of data
objects only within one scoping unit, unless one of the equivalenced
entities is also in a common block (5.5.1.1 and 5.5.2.1)."
program foo
common /x/ a
a = 1
call bar ()
contains
subroutine bar ()
equivalence (a,b)
print *, b
end subroutine bar
end program foo
Should print the uninitialised value for b. Thus, ifc prints out
0.000000E+00. gfortran segfaults, unless the "common /x/ a" is
commented out. It then does the right thing. Alternatively, declaring a
to be real, before the equivalence, also works.
I will add a PR for his one and will put it on the list of things to do,
when I get back. I think that it should be fixed separately to the
above patch, though.
I have to go NOW....
Regards
Paul T
- Previous message (by thread): [Patch, gfortran] PR22304, 17917, 16511, 18870 and 23270 - modules, equivalences and commons
- Next message (by thread): [Patch, gfortran] PR22304, 17917, 16511, 18870 and 23270 - modules,equivalences and commons
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Fortran
mailing list