This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [gfortran] patch: fix COMMON vars in module
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: Tobias Schl?ter <tobias dot schlueter at physik dot uni-muenchen dot de>
- Cc: GCC Fortran mailing list <fortran at gcc dot gnu dot org>, patch <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 10 Jul 2004 16:28:26 -0700
- Subject: Re: [gfortran] patch: fix COMMON vars in module
- References: <40F0792B.60108@physik.uni-muenchen.de>
On Sun, Jul 11, 2004 at 01:18:03AM +0200, Tobias Schl?ter wrote:
>
> Something like
> MODULE m
> common /c/x
> contains
> subroutine b()
> x = 1.
> end
end subroutine b ! Didn't some guy name Tobi fix this :-)
> end
>
use m ! Without this, there is no b() because of name mangling.
> common /c/x
> x = 2.
> call b()
> print *, x
> end
kargl[208] f95 -o a a.f90
Error: a.f90, line 10: Redeclaration of symbol X from USEd module
detected at /@X
Error: a.f90, line 10: X is already in COMMON/C/
detected at X@<end-of-statement>
[f95 terminated - errors found by pass 1]
--
Steve