[RISCV] Rename variable CPUModel to Model
[llvm-project.git] / flang / test / Evaluate / folding29.f90
blobc0ab0631a0c424d33535d9117f72f495683a254c
1 ! RUN: %python %S/test_folding.py %s %flang_fc1
2 ! Tests folding of COUNT()
3 module m
4 logical, parameter :: arr(3,4) = reshape([(modulo(j, 2) == 1, j = 1, size(arr))], shape(arr))
5 logical, parameter :: test_1 = count([1, 2, 3, 2, 1] < [(j, j=1, 5)]) == 2
6 logical, parameter :: test_2 = count(arr) == 6
7 logical, parameter :: test_3 = all(count(arr, dim=1) == [2, 1, 2, 1])
8 logical, parameter :: test_4 = all(count(arr, dim=2) == [2, 2, 2])
9 logical, parameter :: test_5 = count(logical(arr, kind=1)) == 6
10 logical, parameter :: test_6 = count(logical(arr, kind=2)) == 6
11 end module