1 ! RUN: %python %S/test_folding.py %s %flang_fc1
2 ! Test implementations of STORAGE_SIZE() and SIZEOF() as expression rewrites
13 integer, parameter :: ss1
= storage_size(a(1)%a(1)%a
)
14 integer, parameter :: sz1
= sizeof(a(1)%a(1)%a
)
15 integer, parameter :: ss2
= storage_size(a(1)%a(1)%c
)
16 integer, parameter :: sz2
= sizeof(a(1)%a(1)%c
)
17 integer, parameter :: ss3
= storage_size(a(1)%a
)
18 integer, parameter :: sz3
= sizeof(a(1)%a
)
19 integer, parameter :: ss4
= storage_size(a
)
20 integer, parameter :: sz4
= sizeof(a
)
21 logical, parameter :: test_ss
= all([ss1
,ss2
,ss3
,ss4
]==[32, 40, 320, 640])
22 logical, parameter :: test_sz
= all([sz1
,sz2
,sz3
,sz4
]==[24, 15, 80, 160])