aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/proc_decl_12.f90
blob: 37fc4a4e420e08021e7efbfc358c02c567204f0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
! { dg-do run }
!
! This tests the (partial) fix for PR35830, i.e. handling array arguments
! with the PROCEDURE statement.
!
! Contributed by Janus Weil <janus@gcc.gnu.org>

module m
contains
  subroutine one(a)
      integer a(1:3)
      if (any(a /= [1,2,3])) call abort()
  end subroutine one
end module m

program test
  use m
  implicit none
  call foo(one)
contains
  subroutine foo(f)
    procedure(one) :: f
    call f([1,2,3])
  end subroutine foo
end program test