Commit Graph

56 Commits

Author SHA1 Message Date
Steven G. Kargl e8525382d9 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
2004-08-29 15:58:16 +00:00
Steven G. Kargl 4c0c6b9f2c gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_GET?ID.
2004-08-29  Steven G. Kargl  <kargls@comcast.net>
	Paul Brook  <paul@codesourcery.com>

	* gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_GET?ID.
	(gfc_check_f, gfc_simplify_f): Add f0.
	* intrinsic.c (do_check): Call f0.  Flatten.
	(add_sym_0): Fix prototype.  Set f0.
	(add_functions): Add getgid, getgid and getuid.
	(resolve_intrinsic): Remove obsolete comment.
	(do_simplify): Call f0.
	* intrinsic.h (gfc_resolve_getgid, gfc_resolve_getpid,
	gfc_resolve_getuid): Add prototypes.
	* iresolve.c (gfc_resolve_getgid, gfc_resolve_getpid,
	gfc_resolve_getuid): New functions.
	* trans-intrinsic.c (gfc_conv_intrinsic_function): Handle
	GFC_ISYM_GET?ID.
libgfortran/
	* Makefile.am: Add intrinsics/getXid.c.
	* configure.ac: Add tests for get{g,p,u}id.
	* config.h.in: Regenerate.
	* Makefile.in: Regenerate.
	* configure: Regenerate.

Co-Authored-By: Paul Brook <paul@codesourcery.com>

From-SVN: r86703
2004-08-28 23:43:41 +00:00
Roger Sayle 453310d80b re PR libfortran/16137 (Fortran compiler unable to produce executables as libfortran depends on C99 math functions)
PR libgfortran/16137
	* configure.ac: Add tests for acosf, asinf, atan2f, atanf, ceilf,
	copysignf, cosf, coshf, expf, floorf, frexpf, hypotf, logf, log10f,
	scalbnf, sinf, sinhf, sqrtf, tanf and tanhf in libm.
	* config.h.in: Regenerate.
	* configure: Regenerate.

	* instrinsics/c99_functions.c (acosf, asinf, atan2f, atanf, ceilf,
	copysignf, cosf, coshf, expf, floorf, frexpf, hypotf, logf, log10f,
	nextafterf, scalbnf, sinf, sinhf, sqrtf, tanf, tanhf): New stub
	implementations for targets that don't support C99 float functions.

From-SVN: r85473
2004-08-03 13:28:26 +00:00
Paul Brook a9e7b9d395 Makefile.am (gfor_helper_src): Add runtime/normalize.f90.
* Makefile.am (gfor_helper_src): Add runtime/normalize.f90.
	* configure.ac: Add checks for nextafter and nextafterf.
	* Makefile.in, config.h.in, configure: Regenerate.
	* libgfortran.h (normalize_r4_i4, normalize_r8_i8): Declare.
	* intrinsics/rand.c (rand): Use normalize_r4_i4.
	* intrinsics/random.c (random_r4): Use normalize_r4_i4.
	(random_r8): Use normalize_r8_i8.
	* runtime/normalize.c: New file.
testsuite/
	* gfortran.fortran-torture/execute/random_2.f90: New test.

From-SVN: r83070
2004-06-13 22:58:30 +00:00
Bud Davis a2a2059fd7 re PR libfortran/15292 (libgfortran depends on c99 functionality round and roundf)
PR gfortran/15292
	* intrinsics/c99_functions.c: New file.
	* Makefile.am: Add new file.
	* configure.ac: Added test for round/roundf.
	* Makefile.in: Regenerate.
	* configure: Regenerate.
        * configure.h.in: Regenerate.

From-SVN: r83036
2004-06-12 17:59:30 +00:00
Diego Novillo 6de9cd9a88 Merge tree-ssa-20020619-branch into mainline.
From-SVN: r81764
2004-05-13 02:41:07 -04:00