Merged with mainline at revision 128810.
[official-gcc.git] / gcc / testsuite / gfortran.dg / gamma_2.f90
blobca7432b4c5dee1ddf39d818cd309ea9eafc3e7da
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
12 intrinsic :: dgamma
13 intrinsic :: lgamma
14 intrinsic :: algama
15 intrinsic :: dlgama
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) ! FIXME: "is not included in the selected standard"
24 rdp = gamma(rdp) ! FIXME: "is not included in the selected standard"
25 rdp = dgamma(rdp) ! { dg-error "is not included in the selected standard" }
27 rsp = lgamma(rsp) ! FIXME: "is not included in the selected standard"
28 rdp = lgamma(rdp) ! FIXME: "is not included in the selected standard"
29 rsp = algama(rsp) ! { dg-error "is not included in the selected standard" }
30 rdp = dlgama(rdp) ! { dg-error "is not included in the selected standard" }
31 end subroutine foo
32 end