12 lines · plain
1! RUN: %python %S/test_folding.py %s %flang_fc12! Tests folding of structure constructors in array constructors3module m4 type :: t15 integer :: n6 end type7 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])11end module12