OSDN Git Service

Add NIOS2 support. Code from SourceyG++.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / auto_char_len_2.f90
1 ! { dg-do compile }
2 ! { dg-options "-fwhole-file" }
3 !
4 ! PR fortran/41235
5 !
6
7 character(len=*) function func()
8   func = 'ABC'
9 end function func
10
11 subroutine test(i)
12   integer :: i
13   character(len=i), external :: func
14   print *, func()
15 end subroutine test
16
17 subroutine test2(i)
18   integer :: i
19   character(len=i) :: func
20   print *, func()
21 end subroutine test2
22
23 call test(2)
24 call test2(2)
25 end