2011-05-23 Tom de Vries <tom@codesourcery.com>
[official-gcc.git] / gcc / testsuite / gfortran.dg / auto_char_len_2.f90
blob95825c4205a926701e0b0f0acf0f30cfd5f189a8
1 ! { dg-do compile }
2 ! { dg-options "-fwhole-file" }
4 ! PR fortran/41235
7 character(len=*) function func()
8 func = 'ABC'
9 end function func
11 subroutine test(i)
12 integer :: i
13 character(len=i), external :: func
14 print *, func()
15 end subroutine test
17 subroutine test2(i)
18 integer :: i
19 character(len=i) :: func
20 print *, func()
21 end subroutine test2
23 call test(2)
24 call test2(2)
25 end