Peter Klausler | c4360b4 | 2021-12-09 21:00:54 | [diff] [blame] | 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 |