[PATCH, Fortran] Re-fix PR 31292

Steve Kargl sgk@troutmask.apl.washington.edu
Mon Aug 31 23:08:00 GMT 2009


On Mon, Aug 31, 2009 at 02:58:18PM -0700, Steve Kargl wrote:
> On Mon, Aug 31, 2009 at 08:00:10AM +0200, Tobias Burnus wrote:
> > Am 28.08.2009 23:34, schrieb Steve Kargl:
> > > 2009-08-28  Steven G. Kargl <kargl@gcc.gnu.org>
> > >
> > > 	* gfortran.dg/module_procedure_1.f90: New test.
> > >
> > > 2009-08-28  Steven G. Kargl <kargl@gcc.gnu.org>
> > >
> > > 	* fortran/decl.c: Module procedure can appear in PROGRAM and
> > > 	subprogram scope.
> > >   
> > 
> > I think your patch is OK, however, one needs to add a bit more to fully
> > fix the problem, see test case below.
> > 
> 
> I'll hold off on committing my patch until I investigate
> some the issues you point out below.
> 
> > module m
> > contains
> >   subroutine modSub()
> >   end subroutine modSub
> > end module m
> > 
> > use m
> > implicit none
> >   intrinsic sin
> 
> If the above explicit 'intrinsic sin' statement is missing, then ...
> 
> >   interface gen2
> >     module procedure sin ! Invalid per C1208, but not detected
> 
> is this still invalid?  I would assume the answer is "yes"
> because sin is implicitly given the intrinsic attribute.
> 
> > 
> > C1208 (R1206) If MODULE appears in a procedure-stmt, each procedure-name
> > in that statement shall be accessible in the current scope as a
> > module procedure.
> 

How's this

troutmask:sgk[213] gfc4x -c t2.f90
t2.f90:8.23:

      module procedure sin  ! Invalid per C1208, but not detected
                       1
Error: Intrinsic procedure at (1) cannot be a MODULE PROCEDURE


-- 
Steve



More information about the Gcc-patches mailing list