4 INTEGER, PARAMETER :: m(4,4) = RESHAPE([ (i, i=1, 16) ], [4, 4] )
5 INTEGER, PARAMETER :: sevens = COUNT (m == 7)
6 INTEGER, PARAMETER :: odd(4) = COUNT (MOD(m, 2) == 1, dim=1)
7 INTEGER, PARAMETER :: even = COUNT (MOD(m, 2) == 0)
9 IF (sevens /= 1) STOP 1
10 IF (ANY(odd /= [ 2,2,2,2 ])) STOP 2
13 ! check the kind parameter
14 IF (KIND(COUNT (m == 7, KIND=2)) /= 2) STOP 4