3 ! ALLOCATE statements with derived type specification
5 ! Contributed by Janus Weil <janus@gcc.gnu.org>
11 type, extends(t1
) :: t2
15 type, extends(t2
) :: t3
27 class(t1
),dimension(:),allocatable
:: x
28 type(t2
),dimension(:),allocatable
:: y
29 class(t3
),dimension(:),allocatable
:: z
35 allocate(tx
:: x(5)) ! { dg-error "Error in type-spec at" }
36 allocate(u0
:: x(6)) ! { dg-error "may not be ABSTRACT" }
37 allocate(v1
:: x(7)) ! { dg-error "is type incompatible with typespec" }
40 allocate(t1
:: y(2)) ! { dg-error "is type incompatible with typespec" }
42 allocate(t3
:: y(3)) ! { dg-error "is type incompatible with typespec" }
45 allocate(t1
:: z(2)) ! { dg-error "is type incompatible with typespec" }
46 allocate(t2
:: z(3)) ! { dg-error "is type incompatible with typespec" }