Commit Graph

8 Commits

Author SHA1 Message Date
Jakub Jelinek cbe34bb5ed Update copyright years.
From-SVN: r243994
2017-01-01 13:07:43 +01:00
Steven G. Kargl 8a92685e53 re PR fortran/77507 (gfortran rejects keyworded calls to procedures from intrinsic modules)
2016-09-09  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/77507
	* intrinsic.c (add_functions):  Use correct keyword.

2016-09-09  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/77507
 	* ieee/ieee_arithmetic.F90 (IEEE_VALUE_4,IEEE_VALUE_8,IEEE_VALULE_10,
	IEEE_VALUE_16):  Use correct keyword.

2016-09-09  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/77507
	* gfortran.dg/pr77507.f90: New test.

From-SVN: r240050
2016-09-09 17:57:11 +00:00
Jakub Jelinek 818ab71a41 Update copyright years.
From-SVN: r232055
2016-01-04 15:30:50 +01:00
Francois-Xavier Coudert 22a499884f re PR fortran/64022 ([F2003][IEEE] ieee_support_flag does not handle kind=10 and kind=16 REAL variables)
PR fortran/64022

	* simplify.c (gfc_simplify_ieee_selected_real_kind): Extend IEEE
	support to all real kinds.

	* ieee/ieee_exceptions.F90: Support all real kinds.
	* ieee/ieee_arithmetic.F90: Likewise.
	* ieee/ieee_helper.c (ieee_class_helper_10,
	ieee_class_helper_16): New functions
	* gfortran.map (GFORTRAN_1.7): Add entries.

	* gfortran.dg/ieee/ieee_7.f90: Adjust test.
	* gfortran.dg/ieee/large_1.f90: New test.

From-SVN: r226548
2015-08-04 07:27:19 +00:00
Jakub Jelinek 5624e564d2 Update copyright years.
From-SVN: r219188
2015-01-05 13:33:28 +01:00
Francois-Xavier Coudert 3b7ea188c0 f95-lang.c (gfc_init_builtin_functions): Add more floating-point built-ins.
* f95-lang.c (gfc_init_builtin_functions): Add more floating-point
	built-ins.
	* mathbuiltins.def (OTHER_BUILTIN): Define built-ins for logb,
	remainder, rint and signbit.
	* trans-decl.c (save_fp_state, restore_fp_state): Move to
	trans-intrinsic.c
	(gfc_generate_function_code): Use new names for these two functions.
	* trans-expr.c (gfc_conv_function_expr): Catch IEEE functions to
	emit code from the front-end.
	* trans-intrinsic.c (gfc_save_fp_state, gfc_restore_fp_state,
	conv_ieee_function_args, conv_intrinsic_ieee_builtin,
	conv_intrinsic_ieee_is_normal, conv_intrinsic_ieee_is_negative,
	conv_intrinsic_ieee_logb_rint, conv_intrinsic_ieee_rem,
	conv_intrinsic_ieee_next_after, conv_intrinsic_ieee_scalb,
	conv_intrinsic_ieee_copy_sign, gfc_conv_ieee_arithmetic_function):
	New functions.
	* trans.h (gfc_conv_ieee_arithmetic_function,
	gfc_save_fp_state, gfc_restore_fp_state): New prototypes.

	* ieee/ieee_helper.c (ieee_is_finite_*, ieee_is_nan_*,
	ieee_is_negative_*, ieee_is_normal_*, ieee_copy_sign_*,
	ieee_unordered_*, ieee_logb_*, ieee_rint_*, ieee_scalb_*,
	ieee_rem_*, ieee_next_after_*): Remove functions.
	* gfortran.map (GFORTRAN_1.5): Remove corresponding symbols.

From-SVN: r216036
2014-10-09 09:47:25 +00:00
Francois-Xavier Coudert f5168e47a8 libgfortran.h (support_fpu_underflow_control, [...]): New prototypes.
* libgfortran.h (support_fpu_underflow_control,
        get_fpu_underflow_mode, set_fpu_underflow_mode): New prototypes.
	* config/fpu-*.h (support_fpu_underflow_control,
	get_fpu_underflow_mode, set_fpu_underflow_mode):
	New functions.
	* ieee/ieee_arithmetic.F90: Support underflow control.

	* gfortran.dg/ieee/underflow_1.f90: New file.

From-SVN: r212407
2014-07-09 20:32:12 +00:00
Francois-Xavier Coudert 8b19810222 re PR fortran/29383 (Fortran 2003/F95[TR15580:1999]: Floating point exception (IEEE) support)
PR fortran/29383

gcc/fortran/
	* gfortran.h (gfc_simplify_ieee_selected_real_kind): New prototype.
	* libgfortran.h (GFC_FPE_*): Use simple integer values, valid in
	both C and Fortran.
	* expr.c (gfc_check_init_expr): Simplify IEEE_SELECTED_REAL_KIND.
	* simplify.c (gfc_simplify_ieee_selected_real_kind): New function.
	* module.c (mio_symbol): Keep track of symbols which came from
	intrinsic modules.
	(gfc_use_module): Keep track of the IEEE modules.
	* trans-decl.c (gfc_get_symbol_decl): Adjust code since
	we have new intrinsic modules.
	(gfc_build_builtin_function_decls): Build decls for
	ieee_procedure_entry and ieee_procedure_exit.
	(is_from_ieee_module, is_ieee_module_used, save_fp_state,
	restore_fp_state): New functions.
	(gfc_generate_function_code): Save and restore floating-point
	state on procedure entry/exit, when IEEE modules are used.
	* intrinsic.texi: Document the IEEE modules.

libgfortran/
	* configure.host: Add checks for IEEE support, rework priorities.
	* configure.ac: Define IEEE_SUPPORT, check for fpsetsticky and
	fpresetsticky.
	* configure: Regenerate.
	* Makefile.am: Build new ieee files, install IEEE_* modules.
	* Makefile.in: Regenerate.
	* gfortran.map (GFORTRAN_1.6): Add new symbols.
	* libgfortran.h (get_fpu_trap_exceptions, set_fpu_trap_exceptions,
	support_fpu_trap, set_fpu_except_flags, support_fpu_flag,
	support_fpu_rounding_mode, get_fpu_state, set_fpu_state): New
	prototypes.
	* config/fpu-*.h (get_fpu_trap_exceptions,
	set_fpu_trap_exceptions, support_fpu_trap, set_fpu_except_flags,
	support_fpu_flag, support_fpu_rounding_mode, get_fpu_state,
	set_fpu_state): New functions.
	* ieee/ieee_features.F90: New file.
	* ieee/ieee_exceptions.F90: New file.
	* ieee/ieee_arithmetic.F90: New file.
	* ieee/ieee_helper.c: New file.

gcc/testsuite/
	* lib/target-supports.exp (check_effective_target_fortran_ieee): 
	New function.
	* gfortran.dg/ieee/ieee.exp: New file.
	* gfortran.dg/ieee/ieee_1.F90: New file.
	* gfortran.dg/ieee/ieee_2.f90: New file.
	* gfortran.dg/ieee/ieee_3.f90: New file.
	* gfortran.dg/ieee/ieee_4.f90: New file.
	* gfortran.dg/ieee/ieee_5.f90: New file.
	* gfortran.dg/ieee/ieee_6.f90: New file.
	* gfortran.dg/ieee/ieee_7.f90: New file.
	* gfortran.dg/ieee/ieee_rounding_1.f90: New file.

From-SVN: r212102
2014-06-28 14:17:41 +00:00