diff options
author | burnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-08-26 18:11:42 +0000 |
---|---|---|
committer | burnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-08-26 18:11:42 +0000 |
commit | 95b6682397a1e993c33a375881aaffd998495d68 (patch) | |
tree | 733ec1028c30f2c08fd86083c385b58defdd716b /gcc/fortran/intrinsic.c | |
parent | 578ce6bef44f37bd2a5f32d595c80665ec60d33f (diff) | |
download | gcc-95b6682397a1e993c33a375881aaffd998495d68.tar.gz |
2007-08-26 Tobias Burnus <burnus@net-b.de>
PR fortran/32980
* intrinsic.h (gfc_simplify_gamma,gfc_simplify_lgamma,
gfc_resolve_gamma,gfc_resolve_lgamma): New function declations.
* mathbuiltins.def: Define GAMMA and LGAMMA.
* intrinsic.c (add_functions): Add GAMMA, DGAMMA, LGAMMA, ALGAMA
and DLGAMA.
* simplify.c (gfc_simplify_gamma,gfc_simplify_lgamma): New functions.
* iresolve.c (gfc_resolve_gamma,gfc_resolve_lgamma): New functions.
* intrinsic.texi: Add documentation for GAMMA and LGAMMA.
2007-08-26 Tobias Burnus <burnus@net-b.de>
PR fortran/32980
* gfortran.dg/gamma_1.f90: New.
* gfortran.dg/gamma_2.f90: New.
* gfortran.dg/gamma_3.f90: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127809 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/intrinsic.c')
-rw-r--r-- | gcc/fortran/intrinsic.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc/fortran/intrinsic.c b/gcc/fortran/intrinsic.c index 4128e441d63..d273f806111 100644 --- a/gcc/fortran/intrinsic.c +++ b/gcc/fortran/intrinsic.c @@ -1453,6 +1453,16 @@ add_functions (void) make_generic ("fput", GFC_ISYM_FPUT, GFC_STD_GNU); + add_sym_1 ("gamma", GFC_ISYM_GAMMA, CLASS_ELEMENTAL, ACTUAL_NO, BT_REAL, dr, GFC_STD_GNU, + gfc_check_fn_r, gfc_simplify_gamma, gfc_resolve_gamma, + x, BT_REAL, dr, REQUIRED); + + add_sym_1 ("dgamma", GFC_ISYM_GAMMA, CLASS_ELEMENTAL, ACTUAL_NO, BT_REAL, dr, GFC_STD_GNU, + gfc_check_fn_r, gfc_simplify_gamma, gfc_resolve_gamma, + x, BT_REAL, dr, REQUIRED); + + make_generic ("gamma", GFC_ISYM_GAMMA, GFC_STD_GNU); + /* Unix IDs (g77 compatibility) */ add_sym_1 ("getcwd", GFC_ISYM_GETCWD, NO_CLASS, ACTUAL_NO, BT_INTEGER, di, GFC_STD_GNU, NULL, NULL, gfc_resolve_getcwd, @@ -1690,6 +1700,21 @@ add_functions (void) make_generic ("len_trim", GFC_ISYM_LEN_TRIM, GFC_STD_F95); + add_sym_1 ("lgamma", GFC_ISYM_LGAMMA, CLASS_ELEMENTAL, ACTUAL_NO, BT_REAL, dr, GFC_STD_GNU, + gfc_check_fn_r, gfc_simplify_lgamma, gfc_resolve_lgamma, + x, BT_REAL, dr, REQUIRED); + + add_sym_1 ("algama", GFC_ISYM_LGAMMA, CLASS_ELEMENTAL, ACTUAL_NO, BT_REAL, dr, GFC_STD_GNU, + gfc_check_fn_r, gfc_simplify_lgamma, gfc_resolve_lgamma, + x, BT_REAL, dr, REQUIRED); + + add_sym_1 ("dlgama", GFC_ISYM_LGAMMA, CLASS_ELEMENTAL, ACTUAL_NO, BT_REAL, dr, GFC_STD_GNU, + gfc_check_fn_r, gfc_simplify_lgamma, gfc_resolve_lgamma, + x, BT_REAL, dr, REQUIRED); + + make_generic ("lgamma", GFC_ISYM_LGAMMA, GFC_STD_GNU); + + add_sym_2 ("lge", GFC_ISYM_LGE, CLASS_ELEMENTAL, ACTUAL_NO, BT_LOGICAL, dl, GFC_STD_F77, NULL, gfc_simplify_lge, NULL, sta, BT_CHARACTER, dc, REQUIRED, stb, BT_CHARACTER, dc, REQUIRED); |