| 1 |
! { dg-do run } |
| 2 |
program main |
| 3 |
character(len=*), parameter :: f='(3L1)' |
| 4 |
character(len=*), parameter :: g='(3I1)' |
| 5 |
real, dimension(3,3) :: a |
| 6 |
logical(kind=1), dimension(3,3) :: m1 |
| 7 |
logical(kind=2), dimension(3,3) :: m2 |
| 8 |
logical(kind=4), dimension(3,3) :: m4 |
| 9 |
logical(kind=8), dimension(3,3) :: m8 |
| 10 |
character(len=3) :: res |
| 11 |
data a /-1.0, -2.0, -3.0, 2.0, 1.0, -2.1, 1.0, 2.0, 3.0 / |
| 12 |
|
| 13 |
m1 = a > 0 |
| 14 |
m2 = a > 0 |
| 15 |
m4 = a > 0 |
| 16 |
m8 = a > 0 |
| 17 |
|
| 18 |
write (unit=res,fmt=f) any(m1,dim=1) |
| 19 |
if (res /= 'FTT') STOP 1 |
| 20 |
write (unit=res,fmt=f) any(m2,dim=1) |
| 21 |
if (res /= 'FTT') STOP 2 |
| 22 |
write (unit=res,fmt=f) any(m4,dim=1) |
| 23 |
if (res /= 'FTT') STOP 3 |
| 24 |
write (unit=res,fmt=f) any(m8,dim=1) |
| 25 |
if (res /= 'FTT') STOP 4 |
| 26 |
write (unit=res,fmt=f) any(m1,dim=2) |
| 27 |
if (res /= 'TTT') STOP 5 |
| 28 |
write (unit=res,fmt=f) any(m2,dim=2) |
| 29 |
if (res /= 'TTT') STOP 6 |
| 30 |
write (unit=res,fmt=f) any(m4,dim=2) |
| 31 |
if (res /= 'TTT') STOP 7 |
| 32 |
write (unit=res,fmt=f) any(m8,dim=2) |
| 33 |
if (res /= 'TTT') STOP 8 |
| 34 |
|
| 35 |
write (unit=res,fmt=f) all(m1,dim=1) |
| 36 |
if (res /= 'FFT') STOP 9 |
| 37 |
write (unit=res,fmt=f) all(m2,dim=1) |
| 38 |
if (res /= 'FFT') STOP 10 |
| 39 |
write (unit=res,fmt=f) all(m4,dim=1) |
| 40 |
if (res /= 'FFT') STOP 11 |
| 41 |
write (unit=res,fmt=f) all(m8,dim=1) |
| 42 |
if (res /= 'FFT') STOP 12 |
| 43 |
|
| 44 |
write (unit=res,fmt=f) all(m1,dim=2) |
| 45 |
if (res /= 'FFF') STOP 13 |
| 46 |
write (unit=res,fmt=f) all(m2,dim=2) |
| 47 |
if (res /= 'FFF') STOP 14 |
| 48 |
write (unit=res,fmt=f) all(m4,dim=2) |
| 49 |
if (res /= 'FFF') STOP 15 |
| 50 |
write (unit=res,fmt=f) all(m8,dim=2) |
| 51 |
if (res /= 'FFF') STOP 16 |
| 52 |
|
| 53 |
write (unit=res,fmt=g) count(m1,dim=1) |
| 54 |
if (res /= '023') STOP 17 |
| 55 |
write (unit=res,fmt=g) count(m2,dim=1) |
| 56 |
if (res /= '023') STOP 18 |
| 57 |
write (unit=res,fmt=g) count(m4,dim=1) |
| 58 |
if (res /= '023') STOP 19 |
| 59 |
write (unit=res,fmt=g) count(m8,dim=1) |
| 60 |
if (res /= '023') STOP 20 |
| 61 |
|
| 62 |
write (unit=res,fmt=g) count(m1,dim=2) |
| 63 |
if (res /= '221') STOP 21 |
| 64 |
write (unit=res,fmt=g) count(m2,dim=2) |
| 65 |
if (res /= '221') STOP 22 |
| 66 |
write (unit=res,fmt=g) count(m4,dim=2) |
| 67 |
if (res /= '221') STOP 23 |
| 68 |
write (unit=res,fmt=g) count(m8,dim=2) |
| 69 |
if (res /= '221') STOP 24 |
| 70 |
|
| 71 |
end program main |