1! { dg-do compile }
2! { dg-options "-std=f2003 -Wall" }
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!
10subroutine foo()
11intrinsic :: gamma ! { dg-error "Fortran 2008" }
12intrinsic :: dgamma ! { dg-error "extension" }
13intrinsic :: lgamma ! { dg-error "extension" }
14intrinsic :: algama ! { dg-error "extension" }
15intrinsic :: dlgama ! { dg-error "extension" }
16
17integer, parameter :: sp = kind(1.0)
18integer, parameter :: dp = kind(1.0d0)
19
20real(sp) :: rsp = 1.0_sp
21real(dp) :: rdp = 1.0_dp
22
23rsp = gamma(rsp)
24rdp = gamma(rdp)
25rdp = dgamma(rdp)
26
27rsp = lgamma(rsp)
28rdp = lgamma(rdp)
29rsp = algama(rsp)
30rdp = dlgama(rdp)
31end subroutine foo
32end
33