aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/gamma_4.f90
blob: 67e9e2314a1eaece3048a01656e24786ae6d709a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
! { dg-do run }
! { dg-require-effective-target fortran_large_real }
!
! Test the Fortran 2008 intrinsics gamma and log_gamma
!
! PR fortran/32980
!
program gamma_test
implicit none
intrinsic :: gamma, log_gamma
integer, parameter :: qp = selected_real_kind(precision (0.0_8) + 1)

real(qp) :: rqp

if (abs(gamma(1.0_qp)  - 1.0_qp) > tiny(1.0_qp)) call abort()
if (abs(log_gamma(1.0_qp)) > tiny(1.0_qp)) call abort()
end program gamma_test