3 ! PR 46161: [OOP] Invalid: Passing non-polymorphic to allocatable polymorphic dummy
5 ! Contributed by Janus Weil <janus@gcc.gnu.org>
12 type, extends(base) :: ext
15 type(base), allocatable :: a
16 class(base), pointer :: b
17 class(ext), allocatable :: c
19 call test(a) ! { dg-error "must be polymorphic" }
20 call test(b) ! { dg-error "must be ALLOCATABLE" }
21 call test(c) ! { dg-error "must have the same declared type" }
27 class(base), allocatable :: arg