OSDN Git Service

2009-08-20 Thomas Koenig <tkoenig@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / gamma_2.f90
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 !
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" }
16
17 integer, parameter :: sp = kind(1.0)
18 integer, parameter :: dp = kind(1.0d0)
19
20 real(sp) :: rsp = 1.0_sp
21 real(dp) :: rdp = 1.0_dp
22
23 rsp = gamma(rsp)
24 rdp = gamma(rdp)
25 rdp = dgamma(rdp)
26
27 rsp = lgamma(rsp)
28 rdp = lgamma(rdp)
29 rsp = algama(rsp)
30 rdp = dlgama(rdp)
31 end subroutine foo
32 end