Skip to content
Snippets Groups Projects
Commit dca28748 authored by Francois-Xavier Coudert's avatar Francois-Xavier Coudert
Browse files

Fortran: add IEEE_QUIET_* and IEEE_SIGNALING_* comparisons

Those operations were added to Fortran 2018, and correspond to
well-defined IEEE comparison operations, with defined signaling
semantics for NaNs. All are implemented in terms of GCC expressions and
built-ins, with no library support needed.

gcc/fortran/

	* f95-lang.cc (gfc_init_builtin_functions): Add __builtin_iseqsig.
	* trans-intrinsic.cc (conv_intrinsic_ieee_comparison): New
	function.
	(gfc_conv_ieee_arithmetic_function): Handle IEEE comparisons.

gcc/testsuite/

	* gfortran.dg/ieee/comparisons_1.f90: New test.
	* gfortran.dg/ieee/comparisons_2.f90: New test.
	* gfortran.dg/ieee/comparisons_3.F90: New test.

libgfortran/
	* ieee/ieee_arithmetic.F90: Add IEEE_QUIET_* and
	IEEE_SIGNALING_* functions.
parent 34cf27a6
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment