check.c (gfc_check_besn, [...]): New functions.
authorSteven G. Kargl <kargls@comcast.net>
Sun, 29 Aug 2004 15:58:16 +0000 (15:58 +0000)
committerPaul Brook <pbrook@gcc.gnu.org>
Sun, 29 Aug 2004 15:58:16 +0000 (15:58 +0000)
commite8525382d986350f38193ca20504631bfadc43ba
tree764a8802dba0b681b9c0d6f4248a2b2513c2b2fc
parent766ff1b11748f66da98c901b9498a90e72698c05
check.c (gfc_check_besn, [...]): New functions.

2004-08-29  Steven G. Kargl  <kargls@comcast.net>
Paul Brook  <paul@codesourcery.com>

* check.c (gfc_check_besn, gfc_check_g77_math1): New functions.
* f95-lang.c (DO_DEFINE_MATH_BUILTIN): Define.
(DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
(build_builtin_fntypes): New function.
(gfc_init_builtin_functions): Use it.
* gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_{J,Y}{0,1,N}
and GFC_ISYM_ERF{,C}.
(gfc_c_int_kind): Declare.
* intrinsic.c (add_functions): Add [d]bes* and [d]erf*.
* intrinsic.h (gfc_check_besn, gfc_check_g77_math1, gfc_resolve_besn,
gfc_resolve_g77_math1): Add prototypes.
* resolve.c (gfc_resolve_besn, gfc_resolve_g77_math1): New functions.
* mathbuiltins.def: Add comment.  Change third argument.  Use
DEFINE_MATH_BUILTIN_C.  Add bessel and error functions.
* trans-intrinsic.c (BUILT_IN_FUNCTION): Define.
(DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
* trans-types.c (gfc_c_int_kind): Declare.
(gfc_init_kinds): Set it.
testsuite/
* gfortran.dg/g77/README: Update.
* gfortran.dg/g77/erfc.f: Copy from g77.f-torture.
* gfortran.dg/g77/intrinsic-unix-bessel.f: Ditto.
* gfortran.dg/g77/intrinsic-unix-erf.f: Ditto.
libgfortran/
* intrinsics/bessel.c: New file.
* intrinsics/erf.c: New file.
* Makefie.am: Add intrinsics/bessel.c and intrinsics/erf.c.
* configure.ac: Test for C99 Bessel and Error functions.
* Makefile.in: Regenerate.
* config.h.in: Regenerate.
* configure: Regenerate.

Co-Authored-By: Paul Brook <paul@codesourcery.com>
From-SVN: r86727
21 files changed:
gcc/fortran/ChangeLog
gcc/fortran/check.c
gcc/fortran/f95-lang.c
gcc/fortran/gfortran.h
gcc/fortran/intrinsic.c
gcc/fortran/intrinsic.h
gcc/fortran/iresolve.c
gcc/fortran/mathbuiltins.def
gcc/fortran/trans-intrinsic.c
gcc/fortran/trans-types.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/g77/README
gcc/testsuite/gfortran.dg/g77/erfc.f [new file with mode: 0644]
gcc/testsuite/gfortran.dg/g77/intrinsic-unix-bessel.f [new file with mode: 0644]
gcc/testsuite/gfortran.dg/g77/intrinsic-unix-erf.f [new file with mode: 0644]
libgfortran/ChangeLog
libgfortran/Makefile.am
libgfortran/Makefile.in
libgfortran/config.h.in
libgfortran/configure
libgfortran/configure.ac