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
hppa64: Fix fmt_f_default_field_width_3.f90 and fmt_g_default_field_width_3.f90
[official-gcc.git]
/
gcc
/
testsuite
/
gfortran.dg
/
pr110224.f90
blob
186bbf5fe273bf80f6de55c1226df92fbd4e3293
1
! { dg-do compile }
2
!
3
! Contributed by Neil Carlson <neil.n.carlson@gmail.com>
4
!
5
module
mod
6
type
::
foo
7
real
,
pointer
::
var
8
contains
9
procedure
::
var_ptr
10
end type
11
contains
12
function
var_ptr
(
this
)
result
(
ref
)
13
class
(
foo
) ::
this
14
real
,
pointer
::
ref
15
ref
=>
this
%
var
16
end function
17
end module
18
program
main
19
use
mod
20
type
(
foo
) ::
x
21
allocate
(
x
%
var
,
source
=
2.0
)
22
associate
(
var
=>
x
%
var_ptr
())
23
var
=
1.0
24
end
associate
25
if
(
x
%
var
.
ne
.
1.0
)
stop
1
26
x
%
var_ptr
() =
2.0
27
if
(
x
%
var
.
ne
.
2.0
)
stop
2
28
deallocate
(
x
%
var
)
29
end program