re PR fortran/45513 (BOZ kinds differently handled, F2008: BOZ in bit intrinsics)
[official-gcc.git] / gcc / testsuite / gfortran.dg / pr81509_2.f90
blob919cb4e07a5d973387a8c0c97befde80fa689aad
1 ! { dg-do compile }
2 ! https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81509
4 program foo
5 logical :: a = .false.
6 integer :: i = 42
7 integer(8) :: k
8 k = iand(z'aaaa', z'1234') ! { dg-error "cannot both be BOZ literal" }
9 k = and(z'aaaa', z'1234') ! { dg-error "cannot both be BOZ literal" }
10 k = and(1, z'1234')
11 k = and(i, z'1234')
12 k = ieor(z'ade',i)
13 k = ior(i,z'1111')
14 k = ior(i,k) ! { dg-error "different kind type parameters" }
15 k = and(i,k)
16 k = and(a,z'1234') ! { dg-error "must have the same type" }
17 end program foo