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