diff options
author | Tobias Burnus <burnus@net-b.de> | 2010-08-19 09:28:17 +0200 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2010-08-19 09:28:17 +0200 |
commit | 29698e0f2fa1c77242782bc5c8c6a9327b8d32cf (patch) | |
tree | 444e1c1a219a8b1f5c18e7b23532f2e12dbfa224 /gcc/fortran/intrinsic.c | |
parent | 771c5727a06b8d64ce037f592737108ce5fd93e9 (diff) | |
download | gcc-29698e0f2fa1c77242782bc5c8c6a9327b8d32cf.zip gcc-29698e0f2fa1c77242782bc5c8c6a9327b8d32cf.tar.gz gcc-29698e0f2fa1c77242782bc5c8c6a9327b8d32cf.tar.bz2 |
re PR fortran/36158 (Transformational function BESSEL_YN(n1,n2,x) and BESSEL_JN missing)
2010-08-19 Tobias Burnus <burnus@net-b.de>
PR fortran/36158
PR fortran/33197
* check.c (gfc_check_bessel_n2): New function.
* gfortran.h (gfc_isym_id): Add GFC_ISYM_JN2 and GFC_ISYM_YN2.
* intrinsic.c (add_functions): Add transformational version
of the Bessel_jn/yn intrinsics.
* intrinsic.h (gfc_check_bessel_n2,gfc_simplify_bessel_jn2,
gfc_simplify_bessel_yn2): New prototypes.
* intrinsic.texi (Bessel_jn, Bessel_yn): Document
transformational variant.
* simplify.c (gfc_simplify_bessel_jn, gfc_simplify_bessel_yn):
Check for negative order.
(gfc_simplify_bessel_n2,gfc_simplify_bessel_jn2,
gfc_simplify_bessel_yn2): New functions.
2010-08-19 Tobias Burnus <burnus@net-b.de>
PR fortran/36158
PR fortran/33197
* gfortran.dg/bessel_3.f90: New.
* gfortran.dg/bessel_4.f90: New.
* gfortran.dg/bessel_5.f90: New.
From-SVN: r163364
Diffstat (limited to 'gcc/fortran/intrinsic.c')
-rw-r--r-- | gcc/fortran/intrinsic.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/fortran/intrinsic.c b/gcc/fortran/intrinsic.c index cdfcca7..3751167 100644 --- a/gcc/fortran/intrinsic.c +++ b/gcc/fortran/intrinsic.c @@ -1317,6 +1317,11 @@ add_functions (void) gfc_check_besn, gfc_simplify_bessel_jn, gfc_resolve_besn, n, BT_INTEGER, di, REQUIRED, x, BT_REAL, dd, REQUIRED); + add_sym_3 ("bessel_jn", GFC_ISYM_JN2, CLASS_TRANSFORMATIONAL, ACTUAL_NO, BT_REAL, dr, GFC_STD_F2008, + gfc_check_bessel_n2, gfc_simplify_bessel_jn2, NULL, + "n1", BT_INTEGER, di, REQUIRED,"n2", BT_INTEGER, di, REQUIRED, + x, BT_REAL, dr, REQUIRED); + make_generic ("bessel_jn", GFC_ISYM_JN, GFC_STD_F2008); add_sym_1 ("besy0", GFC_ISYM_Y0, CLASS_ELEMENTAL, ACTUAL_NO, BT_REAL, dr, GFC_STD_GNU, @@ -1353,6 +1358,11 @@ add_functions (void) gfc_check_besn, gfc_simplify_bessel_yn, gfc_resolve_besn, n, BT_INTEGER, di, REQUIRED, x, BT_REAL, dd, REQUIRED); + add_sym_3 ("bessel_yn", GFC_ISYM_YN2, CLASS_TRANSFORMATIONAL, ACTUAL_NO, BT_REAL, dr, GFC_STD_F2008, + gfc_check_bessel_n2, gfc_simplify_bessel_yn2, NULL, + "n1", BT_INTEGER, di, REQUIRED,"n2", BT_INTEGER, di, REQUIRED, + x, BT_REAL, dr, REQUIRED); + make_generic ("bessel_yn", GFC_ISYM_YN, GFC_STD_F2008); add_sym_1 ("bit_size", GFC_ISYM_BIT_SIZE, CLASS_INQUIRY, ACTUAL_NO, BT_INTEGER, di, GFC_STD_F95, |