brintos

brintos / llvm-project-archived public Read only

0
0
Text · 739 B · 9fca017 Raw
15 lines · plain
1! RUN: %python %S/test_folding.py %s %flang_fc12! Tests folding of ISHFTC3module m4  integer, parameter :: shift8s(*) = ishftc(257, shift = [(ict, ict = -8, 8)], size=8)5  integer, parameter :: expect1(*) = 256 + [1, 2, 4, 8, 16, 32, 64, 128, &6                                            1, 2, 4, 8, 16, 32, 64, 128, 1]7  logical, parameter :: test_1 = all(shift8s == expect1)8  integer, parameter :: sizes(*) = [(ishftc(257, ict, [(isz, isz = 1, 8)]), ict = -1, 1)]9  integer, parameter :: expect2(*) = 256 + [[1, 2, 4, 8, 16, 32, 64, 128], &10                                            [(1, j = 1, 8)], &11                                            [1, (2, j = 2, 8)]]12  logical, parameter :: test_2 = all(sizes == expect2)13end module14 15