gcc/fortran/
[official-gcc.git] / gcc / testsuite / gfortran.dg / whole_file_24.f90
blob3ff6ca85700f8482d48960b41d9b0559e647c089
1 ! { dg-do compile }
3 ! PR fortran/45077
5 ! Contributed by Dominique d'Humieres, based on a test
6 ! case of Juergen Reuter.
9 module iso_red
10 type, public :: varying_string
11 character(LEN=1), dimension(:), allocatable :: chars
12 end type varying_string
13 end module iso_red
15 module ifiles
16 use iso_red, string_t => varying_string
17 contains
18 function line_get_string_advance (line) result (string)
19 type(string_t) :: string
20 character :: line
21 end function line_get_string_advance
22 end module ifiles
24 module syntax_rules
25 use iso_red, string_t => varying_string
26 use ifiles, only: line_get_string_advance
27 contains
28 subroutine syntax_init_from_ifile ()
29 type(string_t) :: string
30 string = line_get_string_advance ("")
31 end subroutine syntax_init_from_ifile
32 end module syntax_rules
33 end