3 ! Tests that PR66408 stays fixed.
5 ! Contributed by <werner.blokbuster@gmail.com>
12 character(:), allocatable
:: string
15 interface assignment(=)
16 module procedure char_eq_vary
17 end interface assignment(=)
21 subroutine char_eq_vary(my_char
,my_vary
)
22 character(:), allocatable
, intent(out
) :: my_char
23 type(vary
), intent(in
) :: my_vary
24 my_char
= my_vary
%string
25 end subroutine char_eq_vary
32 use mytest
, only
: vary
, assignment(=)
35 character(:), allocatable
:: test_char
36 character(14), parameter :: str
= 'example string'
37 type(vary
) :: test_vary
38 type(vary
) :: my_stuff
41 test_vary
%string
= str
42 if (test_vary
%string
.ne
. str
) call abort
44 ! This previously gave a blank string.
45 my_stuff
%string
= test_vary
46 if (my_stuff
%string
.ne
. str
) call abort
49 if (test_char
.ne
. str
) call abort
52 if (my_stuff
%string
.ne
. str
) call abort