111
|
1 ! { dg-do run }
|
|
2 !
|
|
3 ! Tests the fix for PR63232
|
|
4 !
|
|
5 ! Contributed by Balint Aradi <baradi09@gmail.com>
|
|
6 !
|
|
7 module mymod
|
|
8 implicit none
|
|
9
|
|
10 type :: wrapper
|
|
11 character(:), allocatable :: string
|
|
12 end type wrapper
|
|
13
|
|
14 contains
|
|
15
|
|
16
|
|
17 subroutine sub2(mystring)
|
|
18 character(:), allocatable, intent(out) :: mystring
|
|
19
|
|
20 mystring = "test"
|
|
21
|
|
22 end subroutine sub2
|
|
23
|
|
24 end module mymod
|
|
25
|
|
26
|
|
27 program test
|
|
28 use mymod
|
|
29 implicit none
|
|
30
|
|
31 type(wrapper) :: mywrapper
|
|
32
|
|
33 call sub2(mywrapper%string)
|
|
34 if (.not. allocated(mywrapper%string)) call abort
|
|
35 if (trim(mywrapper%string) .ne. "test") call abort
|
|
36
|
|
37 end program test
|