gcc/fortran/
[official-gcc.git] / gcc / testsuite / gfortran.dg / gamma_2.f90
blob5b0e922cb92edc0a87e2f739bd0c309f45157bb6
1 ! { dg-do compile }
2 ! { dg-options "-std=f2003 -Wall" }
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.
8 ! PR fortran/32980
10 subroutine foo()
11 intrinsic :: gamma ! { dg-error "Fortran 2008" }
12 intrinsic :: dgamma ! { dg-error "extension" }
13 intrinsic :: lgamma ! { dg-error "extension" }
14 intrinsic :: algama ! { dg-error "extension" }
15 intrinsic :: dlgama ! { dg-error "extension" }
17 integer, parameter :: sp = kind(1.0)
18 integer, parameter :: dp = kind(1.0d0)
20 real(sp) :: rsp = 1.0_sp
21 real(dp) :: rdp = 1.0_dp
23 rsp = gamma(rsp)
24 rdp = gamma(rdp)
25 rdp = dgamma(rdp)
27 rsp = lgamma(rsp)
28 rdp = lgamma(rdp)
29 rsp = algama(rsp)
30 rdp = dlgama(rdp)
31 end subroutine foo
32 end