2 ! { dg-options "-fdump-tree-original" }
4 ! PR 43969: [OOP] ALLOCATED() with polymorphic variables
6 ! Contributed by Salvatore Filippone <sfilippone@uniroma2.it>
11 integer, allocatable :: v(:)
14 class(foo_inner), allocatable :: int
17 subroutine foo_checkit()
19 type(foo_outer) :: try
20 type(foo_outer),allocatable :: try2
21 class(foo_outer), allocatable :: try3
23 if (allocated(try%int)) call abort()
24 allocate(foo_outer :: try3)
25 if (allocated(try3%int)) call abort()
27 if (allocated(try2%int)) call abort()
29 end subroutine foo_checkit
42 ! { dg-final { scan-tree-dump-times "__builtin_free" 12 "original" } }