tiny_1.f90: New test.
authorSteven G. Kargl <kargls@comcast.net>
Thu, 7 Apr 2005 18:59:56 +0000 (18:59 +0000)
committerSteven G. Kargl <kargl@gcc.gnu.org>
Thu, 7 Apr 2005 18:59:56 +0000 (18:59 +0000)
* gfortran.dg/tiny_1.f90: New test.
* gfortran.dg/tiny_2.f90: New test.

From-SVN: r97795

gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/tiny_1.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/tiny_2.f90 [new file with mode: 0644]

index 444e7f68758a121fb38acdbd11a40a34849b0ce4..a8f5a50429974ab15b8a0a40c55b0f531833b54a 100644 (file)
@@ -1,3 +1,8 @@
+2005-04-07  Steven G. Kargl  <kargls@comcast.net>
+
+       * gfortran.dg/tiny_1.f90: New test.
+       * gfortran.dg/tiny_2.f90: ditto.
+
 2005-04-07  Thomas Koenig  <Thomas.Koenig@online.de>
 
        * gfortran.dg/eor_1.f90:  Fix dg-do run line
diff --git a/gcc/testsuite/gfortran.dg/tiny_1.f90 b/gcc/testsuite/gfortran.dg/tiny_1.f90
new file mode 100644 (file)
index 0000000..e8bfb2d
--- /dev/null
@@ -0,0 +1,9 @@
+! { dg-do run }
+! Test program inspired by bug report from Walt Brainerd.
+! http://gcc.gnu.org/ml/fortran/2005-04/msg00132.html
+program tiny1
+  real(4) x4
+  real(8) x8
+  if (minexponent(x4) /= exponent(tiny(x4))) call abort
+  if (minexponent(x8) /= exponent(tiny(x8))) call abort
+end program tiny1
diff --git a/gcc/testsuite/gfortran.dg/tiny_2.f90 b/gcc/testsuite/gfortran.dg/tiny_2.f90
new file mode 100644 (file)
index 0000000..194e6cd
--- /dev/null
@@ -0,0 +1,9 @@
+! { dg-do run }
+program tiny2
+  real(4) x4
+  real(8) x8
+  x4 = tiny(x4)
+  x8 = tiny(x8)
+  if (minexponent(x4) /= exponent(x4)) call abort
+  if (minexponent(x8) /= exponent(x8)) call abort
+end program tiny2