2011-02-13 Tobias Burnus <burnus@net-b.de>
[official-gcc.git] / gcc / testsuite / gfortran.dg / argument_checking_17.f90
blobdf8296ba511cd954775e812de0232aafe4f2d2c3
1 ! { dg-do compile }
3 ! PR fortran/47569
5 ! Contributed by Jos de Kloe
7 module teststr
8 implicit none
9 integer, parameter :: GRH_SIZE = 20, NMAX = 41624
10 type strtype
11 integer :: size
12 character :: mdr(NMAX)
13 end type strtype
14 contains
15 subroutine sub2(string,str_size)
16 integer,intent(in) :: str_size
17 character,intent(out) :: string(str_size)
18 string(:) = 'a'
19 end subroutine sub2
20 subroutine sub1(a)
21 type(strtype),intent(inout) :: a
22 call sub2(a%mdr(GRH_SIZE+1),a%size-GRH_SIZE)
23 end subroutine sub1
24 end module teststr
26 ! { dg-final { cleanup-modules "teststr" } }