summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorkargl <kargl@138bc75d-0d04-0410-961f-82ee72b054a4>2005-04-07 18:59:56 +0000
committerkargl <kargl@138bc75d-0d04-0410-961f-82ee72b054a4>2005-04-07 18:59:56 +0000
commit9cd73117af31b9ef1dedfe74c1fbbf73999acfe1 (patch)
treef24fb1b0ddd2ebf1a44f06c8eef8e857033bb9b0 /gcc
parente920115e3fa19d1987c44ee597d3145d123e9a2a (diff)
downloadgcc-9cd73117af31b9ef1dedfe74c1fbbf73999acfe1.tar.gz
* gfortran.dg/tiny_1.f90: New test.
* gfortran.dg/tiny_2.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97795 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gfortran.dg/tiny_1.f909
-rw-r--r--gcc/testsuite/gfortran.dg/tiny_2.f909
3 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 444e7f68758..a8f5a504299 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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
index 00000000000..e8bfb2d8994
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/tiny_1.f90
@@ -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
index 00000000000..194e6cd3109
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/tiny_2.f90
@@ -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