1 ! RUN: %flang_fc1 -fdebug-unparse %s 2>&1 | FileCheck %s
2 subroutine test_storage_size(n
)
4 function return_char(l
)
6 character(l
) :: return_char
10 !CHECK: PRINT *, storage_size(return_char(n))
11 print*, storage_size(return_char(n
))
12 !CHECK: PRINT *, sizeof(return_char(n))
13 print*, sizeof(return_char(n
))
22 function return_pdt(n
)
23 type(t(n
)) :: return_pdt
26 ! NOTE: flang design for length parametrized derived type
27 ! is to use allocatables for the automatic components. Hence,
28 ! their size is independent from the length parameters and is
29 ! a compile time constant.
30 !CHECK: PRINT *, 192_4
31 print *, storage_size(return_pdt(k
))
35 subroutine test_assumed_rank(x
)
37 !CHECK: PRINT *, sizeof(x)