[flang] Accept polymorphic component element in storage_size
[llvm-project.git] / flang / test / Evaluate / folding13.f90
blob9527acd6a98b474ffd4d05a8b5a0652f388125a0
1 ! RUN: %python %S/test_folding.py %s %flang_fc1
2 ! Test folding of array constructors with constant implied DO bounds;
3 ! their indices are constant expressions and can be used as such.
4 module m1
5 integer, parameter :: kinds(*) = [1, 2, 4, 8]
6 integer(kind=8), parameter :: clipping(*) = [integer(kind=8) :: &
7 (int(z'100010101', kind=kinds(j)), j=1,4)]
8 integer(kind=8), parameter :: expected(*) = [ &
9 int(z'01',8), int(z'0101',8), int(z'00010101',8), int(z'100010101',8)]
10 logical, parameter :: test_clipping = all(clipping == expected)
11 end module