[flang] Accept polymorphic component element in storage_size
[llvm-project.git] / flang / test / Evaluate / folding30.f90
blob23da29bbfaf9848425fd9559e8ca436a8039c5b3
1 ! RUN: %python %S/test_folding.py %s %flang_fc1
2 ! Tests folding of structure constructors in array constructors
3 module m
4 type :: t1
5 integer :: n
6 end type
7 type(t1), parameter :: xs1(*) = [(t1(j),j=1,5,2)]
8 type(t1), parameter :: xs2(*) = [(t1(j),j=5,1,-2)]
9 logical, parameter :: test_1 = all(xs1%n == [1, 3, 5])
10 logical, parameter :: test_2 = all(xs2%n == [5, 3, 1])
11 end module