This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
test for allocatable dummy argument-arrays (f95 extension)
- From: Uttam Pawar <uttamp at us dot ibm dot com>
- To: Fortran List <fortran at gcc dot gnu dot org>
- Date: Tue, 29 Nov 2005 10:51:25 -0800
- Subject: test for allocatable dummy argument-arrays (f95 extension)
Hi,
Following test fails to compile. This feature is part of f95 extension
(ISO/IEC TR 15581 : 1998 (E))
This is not supported yet in gfortran I presume? Should I file a PR?
$ cat test.f90
subroutine load(array, unit)
real, allocatable, intent(out), dimension(:,:,:) :: array
integer, intent(in) :: unit
integer :: n1, n2, n3
read(unit) n1, n2, n3
allocate(array(n1,n2,n3))
read(unit) array
end subroutine load
end
$ gfortran test.f90
In file test.f90:2
real, allocatable, intent(out), dimension(:,:,:) :: array
1
Error: ALLOCATABLE attribute conflicts with DUMMY attribute at (1)
In file test.f90:6
allocate(array(n1,n2,n3))
1
Error: Syntax error in ALLOCATE statement at (1)
Thanks,
Uttam