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
* tree-loop-distribution.c (struct partition): New field recording
[official-gcc.git]
/
gcc
/
testsuite
/
gfortran.dg
/
pure_byref_3.f90
blob
cb2644ff8982dcda85ade7bbd4d3aa58cadc419e
1
! { dg-do run }
2
! PR 22607: External/module pure return-by-reference functions
3
4
pure
function
hoj
()
5
integer
::
hoj
(
3
)
6
hoj
= (/
1
,
2
,
3
/)
7
end function
hoj
8
9
module
huj_mod
10
contains
11
pure
function
huj
()
12
integer
::
huj
(
3
)
13
huj
= (/
1
,
2
,
3
/)
14
end function
huj
15
end module
huj_mod
16
17
program
pure_byref_3
18
use
huj_mod
19
implicit none
20
21
interface
22
pure
function
hoj
()
23
integer
::
hoj
(
3
)
24
end function
hoj
25
end interface
26
integer
::
a
(
3
)
27
28
a
=
huj
()
29
if
(.
not
.
all
(
a
== (/
1
,
2
,
3
/)))
call
abort
()
30
31
a
=
hoj
()
32
if
(.
not
.
all
(
a
== (/
1
,
2
,
3
/)))
call
abort
()
33
end program
pure_byref_3