This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gfortran] patch: fix COMMON vars in module


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]