12 lines · plain
1! RUN: %python %S/test_folding.py %s %flang_fc12! Test folding of array constructors with constant implied DO bounds;3! their indices are constant expressions and can be used as such.4module m15 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)11end module12