summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkargl <kargl@138bc75d-0d04-0410-961f-82ee72b054a4>2005-04-09 22:44:24 +0000
committerkargl <kargl@138bc75d-0d04-0410-961f-82ee72b054a4>2005-04-09 22:44:24 +0000
commit855a93fac364dd7e6577cc4d645de041fa70bdf6 (patch)
treeaefae5f80b6c05f3258166c564ffb7437741934b
parentddb36677278a1b1a50b2c4585e36cb7cfdb8a1a7 (diff)
downloadgcc-855a93fac364dd7e6577cc4d645de041fa70bdf6.tar.gz
* gfortran.dg/nint_1.f90: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97931 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gfortran.dg/nint_1.f9014
2 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 1dfa1457971..5ad338ed756 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2005--4-09 Steven G. Kargl <kargls@comcast.net>
+
+ * gfortran.dg/nint_1.f90: New test.
+
2005-04-09 Thomas Koenig <Thomas.Koenig@online.de>
* gfortran.fortran-torture/execute/intrinsic_anyall.f90:
diff --git a/gcc/testsuite/gfortran.dg/nint_1.f90 b/gcc/testsuite/gfortran.dg/nint_1.f90
new file mode 100644
index 00000000000..dd5f817f3e8
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/nint_1.f90
@@ -0,0 +1,14 @@
+program nint_1
+ if (int(anint(8388609.0)) /= 8388609) call abort
+ if (int(anint(0.49999997)) /= 0) call abort
+ if (nint(8388609.0) /= 8388609) call abort
+ if (nint(0.49999997) /= 0) call abort
+ if (int(dnint(4503599627370497.0d0),8) /= 4503599627370497_8) call abort
+ if (int(dnint(0.49999999999999994d0)) /= 0) call abort
+ if (int(anint(-8388609.0)) /= -8388609) call abort
+ if (int(anint(-0.49999997)) /= 0) call abort
+ if (nint(-8388609.0) /= -8388609) call abort
+ if (nint(-0.49999997) /= 0) call abort
+ if (int(dnint(-4503599627370497.0d0),8) /= -4503599627370497_8) call abort
+ if (int(dnint(-0.49999999999999994d0)) /= 0) call abort
+end program nint_1