2015-07-03 Christophe Lyon <christophe.lyon@linaro.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / allocate_alloc_opt_13.f90
blobf9e199c43662e24f1d3aac520625089876f8e325
1 ! { dg-do compile }
3 ! PR fortran/51953
6 type t
7 end type t
9 class(t), allocatable :: a, c(:), e(:)
10 class(t), pointer :: b, d(:)
12 allocate (a, b, source=c(1))
13 allocate (c(4), d(6), source=e)
15 allocate (a, b, mold=f())
16 allocate (c(1), d(6), mold=g())
18 allocate (a, b, source=f())
19 allocate (c(1), d(6), source=g())
21 contains
22 function f()
23 class(t), allocatable :: f
24 end function
25 function g()
26 class(t), allocatable :: g(:)
27 end function
28 end