* tree-loop-distribution.c (struct partition): New field recording
[official-gcc.git] / gcc / testsuite / gfortran.dg / submodule_17.f08
blob8effef4b4178eed3183da7574618c2c82a6fec8b
1 ! { dg-do run }
3 ! Tests the fix for PR77358, in which the wrong gfc_charlen was
4 ! being used for the result of 'get'.
6 ! Contributed by Damian Rouson  <damian@sourceryinstitute.org>
8 module hello_interface
9   character(len=13) :: string="Hello, world!"
10   interface
11     module function get() result(result_string)
12       character(:), allocatable :: result_string
13     end function
14   end interface
15 end module
17 submodule(hello_interface) hello_implementation
18 contains
19   module function get() result(result_string)
20     character(:), allocatable :: result_string
21     result_string = string
22   end function
23 end submodule
25   use hello_interface
26   if (get() .ne. string) call abort
27 end