view gcc/testsuite/gfortran.dg/gamma_4.f90 @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents 84e7813d76e9
children
line wrap: on
line source

! { 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)) STOP 1
if (abs(log_gamma(1.0_qp)) > tiny(1.0_qp)) STOP 2
end program gamma_test