Plugins: Add label-text.h to CPPLIB_H so it will be installed [PR115288]
[official-gcc.git] / gcc / testsuite / gfortran.dg / proc_decl_12.f90
blobf6c3f99ab9ecc67f69e48bdc325cbd3c16401234
1 ! { dg-do run }
3 ! This tests the (partial) fix for PR35830, i.e. handling array arguments
4 ! with the PROCEDURE statement.
6 ! Contributed by Janus Weil <janus@gcc.gnu.org>
8 module m
9 contains
10 subroutine one(a)
11 integer a(1:3)
12 if (any(a /= [1,2,3])) STOP 1
13 end subroutine one
14 end module m
16 program test
17 use m
18 implicit none
19 call foo(one)
20 contains
21 subroutine foo(f)
22 procedure(one) :: f
23 call f([1,2,3])
24 end subroutine foo
25 end program test