12 lines · plain
1! RUN: %python %S/test_folding.py %s %flang_fc12! Tests folding of COUNT()3module m4 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)]) == 26 logical, parameter :: test_2 = count(arr) == 67 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)) == 610 logical, parameter :: test_6 = count(logical(arr, kind=2)) == 611end module12