aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorFrancois-Xavier Coudert <fxcoudert@gcc.gnu.org>2007-08-28 14:32:05 +0000
committerTobias Burnus <burnus@gcc.gnu.org>2007-08-28 16:32:05 +0200
commiteff3e5d6c946f20604c27f2728e1539d83151bbc (patch)
tree7c905ca6dbcfc7c1436ab8998e9fea157bc226d9 /gcc
parentc206a697018f0d9b5da08acb4585bc64aa1cb8e3 (diff)
downloadgcc-eff3e5d6c946f20604c27f2728e1539d83151bbc.zip
gcc-eff3e5d6c946f20604c27f2728e1539d83151bbc.tar.gz
gcc-eff3e5d6c946f20604c27f2728e1539d83151bbc.tar.bz2
gamma_1.f90: Remove large-real tests.
2007-08-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> * gfortran.dg/gamma_1.f90: Remove large-real tests. * gfortran.dg/gamma_2.f90: Remove large-real tests. * gfortran.dg/gamma_4.f90: New: large-real tests. From-SVN: r127860
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/gfortran.dg/gamma_1.f904
-rw-r--r--gcc/testsuite/gfortran.dg/gamma_2.f904
-rw-r--r--gcc/testsuite/gfortran.dg/gamma_4.f9020
4 files changed, 26 insertions, 8 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index b71ec15..050c62d 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2007-08-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+
+ * gfortran.dg/gamma_1.f90: Remove large-real tests.
+ * gfortran.dg/gamma_2.f90: Remove large-real tests.
+ * gfortran.dg/gamma_4.f90: New: large-real tests.
+
2007-08-28 Jason Merrill <jason@redhat.com>
PR c++/28558
diff --git a/gcc/testsuite/gfortran.dg/gamma_1.f90 b/gcc/testsuite/gfortran.dg/gamma_1.f90
index 819f467..c2bbdb6 100644
--- a/gcc/testsuite/gfortran.dg/gamma_1.f90
+++ b/gcc/testsuite/gfortran.dg/gamma_1.f90
@@ -11,20 +11,16 @@ implicit none
intrinsic :: gamma, lgamma
integer, parameter :: sp = kind(1.0)
integer, parameter :: dp = kind(1.0d0)
-integer, parameter :: qp = selected_real_kind(p=15,r=900)
real(sp) :: rsp
real(dp) :: rdp
-real(dp) :: rqp
if (abs(gamma(1.0_sp) - 1.0_sp) > tiny(1.0_sp)) call abort()
if (abs(gamma(1.0_dp) - 1.0_dp) > tiny(1.0_dp)) call abort()
-if (abs(gamma(1.0_qp) - 1.0_qp) > tiny(1.0_qp)) call abort()
if (abs(dgamma(1.0_dp) - 1.0_dp) > tiny(1.0_dp)) call abort()
if (abs(lgamma(1.0_sp)) > tiny(1.0_sp)) call abort()
if (abs(lgamma(1.0_dp)) > tiny(1.0_dp)) call abort()
-if (abs(lgamma(1.0_qp)) > tiny(1.0_qp)) call abort()
if (abs(algama(1.0_sp)) > tiny(1.0_sp)) call abort()
if (abs(dlgama(1.0_dp)) > tiny(1.0_dp)) call abort()
end program gamma_test
diff --git a/gcc/testsuite/gfortran.dg/gamma_2.f90 b/gcc/testsuite/gfortran.dg/gamma_2.f90
index b15696f..ca7432b 100644
--- a/gcc/testsuite/gfortran.dg/gamma_2.f90
+++ b/gcc/testsuite/gfortran.dg/gamma_2.f90
@@ -16,20 +16,16 @@ intrinsic :: dlgama
integer, parameter :: sp = kind(1.0)
integer, parameter :: dp = kind(1.0d0)
-integer, parameter :: qp = selected_real_kind(p=15,r=900)
real(sp) :: rsp = 1.0_sp
real(dp) :: rdp = 1.0_dp
-real(dp) :: rqp = 1.0_qp
rsp = gamma(rsp) ! FIXME: "is not included in the selected standard"
rdp = gamma(rdp) ! FIXME: "is not included in the selected standard"
-rqp = gamma(rqp) ! FIXME: "is not included in the selected standard"
rdp = dgamma(rdp) ! { dg-error "is not included in the selected standard" }
rsp = lgamma(rsp) ! FIXME: "is not included in the selected standard"
rdp = lgamma(rdp) ! FIXME: "is not included in the selected standard"
-rqp = lgamma(rqp) ! FIXME: "is not included in the selected standard"
rsp = algama(rsp) ! { dg-error "is not included in the selected standard" }
rdp = dlgama(rdp) ! { dg-error "is not included in the selected standard" }
end subroutine foo
diff --git a/gcc/testsuite/gfortran.dg/gamma_4.f90 b/gcc/testsuite/gfortran.dg/gamma_4.f90
new file mode 100644
index 0000000..807f25a
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gamma_4.f90
@@ -0,0 +1,20 @@
+! { dg-do run }
+! { dg-require-effective-target fortran_large_real }
+!
+! Test the vendor intrinsic (d)gamma, lgamma and algama/dlgama
+! gamma is also part of the Fortran 2008 draft; lgamma is called
+! log_gamma in the Fortran 2008 draft.
+!
+! PR fortran/32980
+!
+program gamma_test
+implicit none
+intrinsic :: gamma, lgamma
+integer, parameter :: qp = selected_real_kind(p=15,r=900)
+
+real(qp) :: rqp
+
+if (abs(gamma(1.0_qp) - 1.0_qp) > tiny(1.0_qp)) call abort()
+if (abs(lgamma(1.0_qp)) > tiny(1.0_qp)) call abort()
+end program gamma_test
+