summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/iall_iany_iparity_1.f90
blob: 35b4e168e77f317f69a439507b591f60368d7e13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
! { dg-do run }
!
! PR fortran/38282
!
implicit none
integer :: a(2,1)

a(1,1) = 35
a(2,1) = -74

if (iand(a(1,1),a(2,1)) /= iall(a)) call abort ()
if (iand(a(1,1),a(2,1)) /= iall(array=[35, -74])) call abort ()
if (any (iand(a(1,1),a(2,1)) /= iall(a,dim=1))) call abort ()
if (iand(a(1,1),a(2,1)) /= iall(dim=1,mask=[.true.,.true.],array=[35, -74])) call abort ()

if (ior(a(1,1),a(2,1)) /= iany(a)) call abort ()
if (ior(a(1,1),a(2,1)) /= iany(array=[35, -74])) call abort ()
if (any (ior(a(1,1),a(2,1)) /= iany(a,dim=1))) call abort ()
if (ior(a(1,1),a(2,1)) /= iany(dim=1,mask=[.true.,.true.],array=[35, -74])) call abort ()

if (ieor(a(1,1),a(2,1)) /= iparity(a)) call abort ()
if (ieor(a(1,1),a(2,1)) /= iparity(array=[35, -74])) call abort ()
if (any (ieor(a(1,1),a(2,1)) /= iparity(a,dim=1))) call abort ()
if (ieor(a(1,1),a(2,1)) /= iparity(dim=1,mask=[.true.,.true.],array=[35, -74])) call abort ()

end