[Clang] Make OpenMP offloading consistently use the bound architecture (#125135)
[llvm-project.git] / flang / test / Evaluate / fold-ishftc.f90
blob9fca0175a75c4bca71bf2fe471b685bbb408cda1
1 ! RUN: %python %S/test_folding.py %s %flang_fc1
2 ! Tests folding of ISHFTC
3 module m
4 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)
13 end module