2 ! { dg-options "-fdump-tree-original" }
16 class(t
), allocatable
, intent(out
) :: x(:)
18 if (allocated (x
)) STOP 1
19 if (.not
. same_type_as(x
, var_t
)) STOP 2
25 class(t
), allocatable
, OPTIONAL
, intent(out
) :: x(:)
27 if (.not
. present(x
)) return
28 if (allocated (x
)) STOP 3
29 if (.not
. same_type_as(x
, var_t
)) STOP 4
37 class(t
), save, allocatable
:: y(:)
39 if (allocated (y
)) STOP 5
40 if (.not
. same_type_as(y
,var_t
)) STOP 6
43 if (.not
.allocated(y
)) STOP 7
44 if (.not
. same_type_as(y
, var_t2
)) STOP 8
45 if (size (y
) /= 5) STOP 9
48 if (.not
.allocated(y
)) STOP 10
49 if (.not
. same_type_as(y
, var_t2
)) STOP 11
50 if (size (y
) /= 5) STOP 12
53 if (allocated (y
)) STOP 13
54 if (.not
. same_type_as(y
,var_t
)) STOP 14
59 if (.not
.allocated(y
)) STOP 15
60 if (.not
. same_type_as(y
, var_t2
)) STOP 16
61 if (size (y
) /= 5) STOP 17
64 if (.not
.allocated(y
)) STOP 18
65 if (.not
. same_type_as(y
, var_t2
)) STOP 19
66 if (size (y
) /= 5) STOP 20
69 ! { dg-final { scan-tree-dump-times "__builtin_free" 5 "original" } }
70 ! { dg-final { scan-tree-dump-times "finally" 0 "original" } }