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]

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


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