* config/sparc/driver-sparc.c (cpu_names): Add SPARC-T5 entry.
[official-gcc.git] / gcc / testsuite / gfortran.dg / gamma_1.f90
blob9946166952a8f286470b60abb8b52ca31a30bbf4
1 ! { dg-do run }
3 ! Test the vendor intrinsic (d)gamma, lgamma and algama/dlgama
4 ! gamma is also part of the Fortran 2008 draft; lgamma is called
5 ! log_gamma in the Fortran 2008 draft.
7 ! PR fortran/32980
9 program gamma_test
10 implicit none
11 intrinsic :: gamma, lgamma, log_gamma
12 integer, parameter :: sp = kind(1.0)
13 integer, parameter :: dp = kind(1.0d0)
15 real(sp) :: rsp
16 real(dp) :: rdp
18 if (abs(gamma(1.0_sp) - 1.0_sp) > tiny(1.0_sp)) call abort()
19 if (abs(gamma(1.0_dp) - 1.0_dp) > tiny(1.0_dp)) call abort()
20 if (abs(dgamma(1.0_dp) - 1.0_dp) > tiny(1.0_dp)) call abort()
22 if (abs(lgamma(1.0_sp)) > tiny(1.0_sp)) call abort()
23 if (abs(lgamma(1.0_dp)) > tiny(1.0_dp)) call abort()
24 if (abs(log_gamma(1.0_sp)) > tiny(1.0_sp)) call abort()
25 if (abs(log_gamma(1.0_dp)) > tiny(1.0_dp)) call abort()
26 if (abs(algama(1.0_sp)) > tiny(1.0_sp)) call abort()
27 if (abs(dlgama(1.0_dp)) > tiny(1.0_dp)) call abort()
28 end program gamma_test