OSDN Git Service

2007-08-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / gamma_4.f90
1 ! { dg-do run }
2 ! { dg-require-effective-target fortran_large_real }
3 !
4 ! Test the vendor intrinsic (d)gamma, lgamma and algama/dlgama
5 ! gamma is also part of the Fortran 2008 draft; lgamma is called
6 ! log_gamma in the Fortran 2008 draft.
7 !
8 ! PR fortran/32980
9 !
10 program gamma_test
11 implicit none
12 intrinsic :: gamma, lgamma
13 integer, parameter :: qp = selected_real_kind(p=15,r=900)
14
15 real(qp) :: rqp
16
17 if (abs(gamma(1.0_qp)  - 1.0_qp) > tiny(1.0_qp)) call abort()
18 if (abs(lgamma(1.0_qp)) > tiny(1.0_qp)) call abort()
19 end program gamma_test
20