diff options
author | jvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-06-18 06:42:26 +0000 |
---|---|---|
committer | jvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-06-18 06:42:26 +0000 |
commit | 6c24e54b8dae9db1c3baafacdb2d3e61f5accffd (patch) | |
tree | 9ac7046fc97ef16b6ebdc98796beb07934875180 /gcc/testsuite | |
parent | 09638e2c383f34bc01686181ae5438a7a5192b4e (diff) | |
download | gcc-6c24e54b8dae9db1c3baafacdb2d3e61f5accffd.tar.gz |
2006-06-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/19310
PR fortran/19904
* gfortran.dg/real_const_3.f90: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@114753 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/real_const_3.f90 | 41 |
2 files changed, 47 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index fe2b7e8b398..c0e3fa2207e 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 00000000000..66cda9eab80 --- /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 )" |