summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/whole_file_24.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/whole_file_24.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/whole_file_24.f9035
1 files changed, 35 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/whole_file_24.f90 b/gcc/testsuite/gfortran.dg/whole_file_24.f90
new file mode 100644
index 000000000..4ac11cce2
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/whole_file_24.f90
@@ -0,0 +1,35 @@
+! { dg-do compile }
+!
+! PR fortran/45077
+!
+! Contributed by Dominique d'Humieres, based on a test
+! case of Juergen Reuter.
+!
+
+module iso_red
+ type, public :: varying_string
+ character(LEN=1), dimension(:), allocatable :: chars
+ end type varying_string
+end module iso_red
+
+module ifiles
+ use iso_red, string_t => varying_string
+contains
+ function line_get_string_advance (line) result (string)
+ type(string_t) :: string
+ character :: line
+ end function line_get_string_advance
+end module ifiles
+
+module syntax_rules
+ use iso_red, string_t => varying_string
+ use ifiles, only: line_get_string_advance
+contains
+ subroutine syntax_init_from_ifile ()
+ type(string_t) :: string
+ string = line_get_string_advance ("")
+ end subroutine syntax_init_from_ifile
+end module syntax_rules
+end
+
+! { dg-final { cleanup-modules "iso_red ifiles syntax_rules" } }