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
PR target/83368
[official-gcc.git]
/
gcc
/
testsuite
/
gfortran.dg
/
select_type_14.f03
blob
2d37bbc7f8bd6edde46da8cd3b4c02b232964a5c
1
! { dg-do run }
2
3
! PR fortran/44047
4
! Double free happened, check that it works now.
5
6
! Contributed by Janus Weil, janus@gcc.gnu.org.
7
8
implicit none
9
type t0
10
integer :: j = 42
11
end type t0
12
type t
13
integer :: i
14
class(t0), allocatable :: foo
15
end type t
16
type(t) :: m
17
allocate(t0 :: m%foo)
18
m%i = 5
19
select type(bar => m%foo)
20
type is(t0)
21
print *, bar
22
if (bar%j /= 42) call abort ()
23
end select
24
end