blob: 9527acd6a98b474ffd4d05a8b5a0652f388125a0 [file] [log] [blame]
! RUN: %python %S/test_folding.py %s %flang_fc1
! Test folding of array constructors with constant implied DO bounds;
! their indices are constant expressions and can be used as such.
module m1
integer, parameter :: kinds(*) = [1, 2, 4, 8]
integer(kind=8), parameter :: clipping(*) = [integer(kind=8) :: &
(int(z'100010101', kind=kinds(j)), j=1,4)]
integer(kind=8), parameter :: expected(*) = [ &
int(z'01',8), int(z'0101',8), int(z'00010101',8), int(z'100010101',8)]
logical, parameter :: test_clipping = all(clipping == expected)
end module