blob: e32df0e01b49fbda712ccff970ba9fe6101da477 (
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
|
! { dg-do compile }
! PR 18883: Fake result variables of non-constant length, in module
module foo
contains
function s_to_c(chars)
character, pointer :: chars(:)
character(len=len(chars)) :: s_to_c
s_to_c = 'a'
end function s_to_c
end module foo
program huj
use foo
implicit none
character, pointer :: c(:)
character(3) :: s
allocate(c(5))
c = (/"a", "b", "c" /)
s = s_to_c(c)
end program huj
|