aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJerry DeLisle <jvdelisle@gcc.gnu.org>2006-06-18 06:42:26 +0000
committerJerry DeLisle <jvdelisle@gcc.gnu.org>2006-06-18 06:42:26 +0000
commit604f802b4478da1602c551b750e1a9366df4fdcf (patch)
tree9ac7046fc97ef16b6ebdc98796beb07934875180 /gcc
parent545548257d8ad0c0663f70c61a1fd189eaf896b8 (diff)
downloadgcc-604f802b4478da1602c551b750e1a9366df4fdcf.zip
gcc-604f802b4478da1602c551b750e1a9366df4fdcf.tar.gz
gcc-604f802b4478da1602c551b750e1a9366df4fdcf.tar.bz2
re PR fortran/19310 ([4.1 Only] unnecessary error for overflowing results)
2006-06-18 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR fortran/19310 PR fortran/19904 * gfortran.dg/real_const_3.f90: New test. From-SVN: r114753
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/gfortran.dg/real_const_3.f9041
2 files changed, 47 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index fe2b7e8..c0e3fa2 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2006-06-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR fortran/19310
+ PR fortran/19904
+ * gfortran.dg/real_const_3.f90: New test.
+
2006-06-16 Mark Mitchell <mark@codesourcery.com>
PR c++/28016
diff --git a/gcc/testsuite/gfortran.dg/real_const_3.f90 b/gcc/testsuite/gfortran.dg/real_const_3.f90
new file mode 100644
index 0000000..66cda9e
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/real_const_3.f90
@@ -0,0 +1,41 @@
+!{ dg-run }
+!{ dg-options "-fno-range-check" }
+! PR19310 and PR19904, allow disabling range check during compile.
+! Contributed by Jerry DeLisle <jvdelisle@gcc.gnu.org>
+program main
+ real, parameter :: zero=0, nan=0/zero
+ complex :: z = (-0.1,-2.2)/(0.0,0.0)
+ complex :: z2 = (0.1,1)/0
+ complex :: z3 = (1e300, -2e-200)/1234e-325
+ complex :: z4 = (1e-300, -2e-200)/1234e325
+ real :: a
+ a = exp(1000.0)
+ b = 1/exp(1000.0)
+ print *, a
+ print *, b
+ print *, -1.0/b
+ print *, b/0.0
+ print *, 0.0/0.0
+ print *, 1.0/-0.0
+ print *, -2.0/0.0
+ print *, 3.0/0.0
+ print *, nan
+ print *, z
+ print *, z2
+ print *, z3
+ print *, z4
+
+end program main
+!{dg-output " +Infinity"
+!{dg-output " 0.000000"
+!{dg-output " -Infinity"
+!{dg-output " NaN"
+!{dg-output " NaN"
+!{dg-output " -Infinity"
+!{dg-output " -Infinity"
+!{dg-output " +Infinity"
+!{dg-output " NaN"
+!{dg-output " ( NaN, NaN)"
+!{dg-output " ( NaN, NaN)"
+!{dg-output " ( +Infinity, -Infinity)"
+!{dg-output " ( 0.000000 , 0.000000 )"