aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/gfortran.dg/ibits.f9015
2 files changed, 20 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 5368362..d9b05a8 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,4 +1,8 @@
-2006-01-03 Zdenek Dvorak <dvorakz@suse.cz>
+2007-01-03 Steven G. Kargl <kargls@comcast.net>
+
+ * gfortran.dg/ibits.f90: New test.
+
+2007-01-03 Zdenek Dvorak <dvorakz@suse.cz>
* gcc.dg/tree-ssa/update-unroll-1.c: New test.
* gcc.dg/tree-ssa/update-unswitch-1.c: New test.
diff --git a/gcc/testsuite/gfortran.dg/ibits.f90 b/gcc/testsuite/gfortran.dg/ibits.f90
new file mode 100644
index 0000000..e0144ed
--- /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'
+ 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
+