This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gfortran] patch: fix COMMON vars in module
- From: Tobias Schlüter <tobias dot schlueter at physik dot uni-muenchen dot de>
- To: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- Cc: GCC Fortran mailing list <fortran at gcc dot gnu dot org>,patch <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 11 Jul 2004 01:45:21 +0200
- Subject: Re: [gfortran] patch: fix COMMON vars in module
- References: <40F0792B.60108@physik.uni-muenchen.de> <20040710232826.GA22149@troutmask.apl.washington.edu>
Steve Kargl wrote:
> On Sun, Jul 11, 2004 at 01:18:03AM +0200, Tobias Schl?ter wrote:
>
>>Something like
>>MODULE m
>> common /c/x
^^^ y
>>contains
>> subroutine b()
>> x = 1.
^^^ y
>> end
>
> end subroutine b ! Didn't some guy name Tobi fix this :-)
;-) hm, maybe I should go to bed.
If it wasn't clear, the problem was that inside a module, variables from
commons weren't be translated correctly, and therefore there was no
relation between the memory locations of y and x from my corrected example.
Thanks for actually trying my example,
- Tobi