3 ! FIXME: Remove -w after polymorphic entities are supported.
6 ! ALLOCATE statements with derived type specification
8 ! Contributed by Janus Weil <janus@gcc.gnu.org>
14 type, extends(t1) :: t2
18 type, extends(t2) :: t3
30 class(t1),dimension(:),allocatable :: x
31 type(t2),dimension(:),allocatable :: y
32 class(t3),dimension(:),allocatable :: z
38 allocate(tx :: x(5)) ! { dg-error "is not an accessible derived type" }
39 allocate(u0 :: x(6)) ! { dg-error "may not be ABSTRACT" }
40 allocate(v1 :: x(7)) ! { dg-error "is type incompatible with typespec" }
43 allocate(t1 :: y(2)) ! { dg-error "is type incompatible with typespec" }
45 allocate(t3 :: y(3)) ! { dg-error "is type incompatible with typespec" }
48 allocate(t1 :: z(2)) ! { dg-error "is type incompatible with typespec" }
49 allocate(t2 :: z(3)) ! { dg-error "is type incompatible with typespec" }