summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/ibits.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/ibits.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/ibits.f9015
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/ibits.f90 b/gcc/testsuite/gfortran.dg/ibits.f90
new file mode 100644
index 000000000..9233b97a3
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/ibits.f90
@@ -0,0 +1,15 @@
+! { dg-do run }
+! Test that the mask is properly converted to the kind type of j in ibits.
+program ibits_test
+ implicit none
+ integer(8), parameter :: n = z'00000000FFFFFFFF' ! { dg-warning "BOZ literal at .1. outside a DATA statement" }
+ integer(8) i,j,k,m
+ j = 1
+ do i=1,70
+ j = ishft(j,1) + 1
+ k = ibits(j, 0, 32)
+ m = iand(j,n)
+ if (k /= m) call abort
+ end do
+end program ibits_test
+