mirror of
https://github.com/autc04/Retro68.git
synced 2024-09-28 18:56:06 +00:00
29 lines
443 B
Fortran
29 lines
443 B
Fortran
! { dg-do compile }
|
|
!
|
|
! PR fortran/51953
|
|
!
|
|
!
|
|
type t
|
|
end type t
|
|
|
|
class(t), allocatable :: a, c(:), e(:)
|
|
class(t), pointer :: b, d(:)
|
|
|
|
allocate (a, b, source=c(1))
|
|
allocate (c(4), d(6), source=e)
|
|
|
|
allocate (a, b, mold=f())
|
|
allocate (c(1), d(6), mold=g())
|
|
|
|
allocate (a, b, source=f())
|
|
allocate (c(1), d(6), source=g())
|
|
|
|
contains
|
|
function f()
|
|
class(t), allocatable :: f
|
|
end function
|
|
function g()
|
|
class(t), allocatable :: g(:)
|
|
end function
|
|
end
|