1! Testcases for the AND, OR and XOR functions (GNU intrinsics). 2! { dg-do compile } 3 integer i 4 logical l 5 real r 6 complex c 7 8 print *, and(i,i) 9 print *, and(l,l) 10 print *, and(i,r) ! { dg-error "must be INTEGER or LOGICAL" } 11 print *, and(c,l) ! { dg-error "must be INTEGER or LOGICAL" } 12 print *, and(i,l) ! { dg-error "must have the same type" } 13 print *, and(l,i) ! { dg-error "must have the same type" } 14 15 print *, or(i,i) 16 print *, or(l,l) 17 print *, or(i,r) ! { dg-error "must be INTEGER or LOGICAL" } 18 print *, or(c,l) ! { dg-error "must be INTEGER or LOGICAL" } 19 print *, or(i,l) ! { dg-error "must have the same type" } 20 print *, or(l,i) ! { dg-error "must have the same type" } 21 22 print *, xor(i,i) 23 print *, xor(l,l) 24 print *, xor(i,r) ! { dg-error "must be INTEGER or LOGICAL" } 25 print *, xor(c,l) ! { dg-error "must be INTEGER or LOGICAL" } 26 print *, xor(i,l) ! { dg-error "must have the same type" } 27 print *, xor(l,i) ! { dg-error "must have the same type" } 28 29 end 30