4 ! [OOP] Sourced allocation fails with unlimited polymorphism
5 ! Contributed by <rxs@hotmail.de>
10 character(len=:), allocatable :: test
13 call allocate_test(test)
18 subroutine allocate_test(var)
20 class(*), pointer :: copyofvar
21 allocate(copyofvar, source=var)
22 select type (copyofvar)
23 type is (character(len=*))
24 ! print*, len(copyofvar), copyofvar
25 if (len(copyofvar) /= 11) call abort ()
26 if (copyofvar /= "A test case") call abort ()