repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Merge from mainline.
[official-gcc.git]
/
gcc
/
testsuite
/
gfortran.dg
/
char_result_9.f90
blob
062901e1bed43fe4ff2d1bc1d8a44fcb96ad5d7d
1
! { dg-do compile }
2
! PR 18883: Fake result variables of non-constant length, in module
3
module
foo
4
contains
5
function
s_to_c
(
chars
)
6
character
,
pointer
::
chars
(:)
7
character
(
len
=
len
(
chars
)) ::
s_to_c
8
s_to_c
=
'a'
9
end function
s_to_c
10
end module
foo
11
12
program
huj
13
14
use
foo
15
16
implicit none
17
character
,
pointer
::
c
(:)
18
character
(
3
) ::
s
19
20
allocate
(
c
(
5
))
21
c
= (/
"a"
,
"b"
,
"c"
/)
22
s
=
s_to_c
(
c
)
23
24
end program
huj
25
26
! { dg-final { cleanup-modules "foo" } }