Query abt Allocatable Dummy argument in F2003

Steve Kargl sgk@troutmask.apl.washington.edu
Mon Aug 8 16:12:00 GMT 2005


On Mon, Aug 08, 2005 at 01:44:19PM +0530, Sudesh   Chandna, Noida wrote:
> Also kindly note that same constraint is there for pointer
> attribute. "Interface must be explicit if dummy argument
> has pointer attribute". (Section 12.3.1.1) But Gfortran
> doesn't generate any error message if interface is not given
> explicitly. 
> 
> Kindly see the example below:
> 
> program main
> integer(kind=4),pointer::a(:)
> allocate(a(10))
> call sub(a)
> print *,a
> deallocate(a)
> end
> 
> subroutine sub(a)
> integer,pointer::a(:)
> a=10
> end subroutine sub
> 
> It doesn't generate compile time error message but it gives
> Segmentation fault.
> 
> Is this a bug in Gfortran ? 
> 

Yes, it is a bug.  The compiler should never segfault.
Please submit a bug report.

-- 
Steve



More information about the Fortran mailing list