gcc/libgfortran
Fritz Reese 57391ddaf3 Fix PR fortran/93871 and re-implement degree-valued trigonometric intrinsics.
2020-04-01  Fritz Reese  <foreese@gcc.gnu.org>
	    Steven G. Kargl  <kargl@gcc.gnu.org>

gcc/fortran/ChangeLog

	PR fortran/93871
	* gfortran.h (GFC_ISYM_ACOSD, GFC_ISYM_ASIND, GFC_ISYM_ATAN2D,
	GFC_ISYM_ATAND, GFC_ISYM_COSD, GFC_ISYM_COTAND, GFC_ISYM_SIND,
	GFC_ISYM_TAND): New.
	* intrinsic.c (add_functions): Remove check for flag_dec_math.
	Give degree trig functions simplification and name resolution
	functions (e.g, gfc_simplify_atrigd () and gfc_resolve_atrigd ()).
	(do_simplify): Remove special casing of degree trig functions.
	* intrinsic.h (gfc_simplify_acosd, gfc_simplify_asind,
	gfc_simplify_atand, gfc_simplify_cosd, gfc_simplify_cotand,
	gfc_simplify_sind, gfc_simplify_tand, gfc_resolve_trigd2): Add new
	prototypes.
	(gfc_simplify_atrigd, gfc_simplify_trigd, gfc_resolve_cotan,
	resolve_atrigd): Remove prototypes of deleted functions.
	* iresolve.c (is_trig_resolved, copy_replace_function_shallow,
	gfc_resolve_cotan, get_radians, get_degrees, resolve_trig_call,
	gfc_resolve_atrigd, gfc_resolve_atan2d): Delete functions.
	(gfc_resolve_trigd, gfc_resolve_trigd2): Resolve to library functions.
	* simplify.c (rad2deg, deg2rad, gfc_simplify_acosd, gfc_simplify_asind,
	gfc_simplify_atand, gfc_simplify_atan2d, gfc_simplify_cosd,
	gfc_simplify_sind, gfc_simplify_tand, gfc_simplify_cotand): New
	functions.
	(gfc_simplify_atan2): Fix error message.
	(simplify_trig_call, gfc_simplify_trigd, gfc_simplify_atrigd,
	radians_f): Delete functions.
	* trans-intrinsic.c: Add LIB_FUNCTION decls for sind, cosd, tand.
	(rad2deg, gfc_conv_intrinsic_atrigd, gfc_conv_intrinsic_cotan,
	gfc_conv_intrinsic_cotand, gfc_conv_intrinsic_atan2d): New functions.
	(gfc_conv_intrinsic_function): Handle ACOSD, ASIND, ATAND, COTAN,
	COTAND, ATAN2D.
	* trigd_fe.inc: New file. Included by simplify.c to implement
	simplify_sind, simplify_cosd, simplify_tand with code common to the
	libgfortran implementation.

gcc/testsuite/ChangeLog

	PR fortran/93871
	* gfortran.dg/dec_math.f90: Extend coverage to real(10) and real(16).
	* gfortran.dg/dec_math_2.f90: New test.
	* gfortran.dg/dec_math_3.f90: Likewise.
	* gfortran.dg/dec_math_4.f90: Likewise.
	* gfortran.dg/dec_math_5.f90: Likewise.

libgfortran/ChangeLog

	PR fortran/93871
	* Makefile.am, Makefile.in: New make rule for intrinsics/trigd.c.
	* gfortran.map: New routines for {sind, cosd, tand}X{r4, r8, r10, r16}.
	* intrinsics/trigd.c, intrinsics/trigd_lib.inc, intrinsics/trigd.inc:
	New files. Defines native degree-valued trig functions.
2020-04-07 13:18:38 -04:00
..
caf Update copyright years. 2020-01-01 12:51:42 +01:00
config Update copyright years. 2020-01-01 12:51:42 +01:00
generated Update copyright years. 2020-01-01 12:51:42 +01:00
ieee Update copyright years. 2020-01-01 12:51:42 +01:00
intrinsics Fix PR fortran/93871 and re-implement degree-valued trigonometric intrinsics. 2020-04-07 13:18:38 -04:00
io Use au->lock exclusively for locking in async I/O. 2020-02-18 19:45:25 +01:00
m4 Update copyright years. 2020-01-01 12:51:42 +01:00
runtime Update copyright years. 2020-01-01 12:51:42 +01:00
acinclude.m4 Replace sync builtins with atomic builtins 2018-11-22 09:58:29 +02:00
aclocal.m4 Add `--with-toolexeclibdir=' configuration option 2020-01-24 11:24:25 +00:00
c99_protos.h Update copyright years. 2020-01-01 12:51:42 +01:00
ChangeLog Fix PR fortran/93871 and re-implement degree-valued trigonometric intrinsics. 2020-04-07 13:18:38 -04:00
ChangeLog-2002
ChangeLog-2003
ChangeLog-2004
ChangeLog-2005
ChangeLog-2006
ChangeLog-2007
ChangeLog-2008
ChangeLog-2009
ChangeLog-2010
ChangeLog-2011
ChangeLog-2012
ChangeLog-2013
ChangeLog-2014 Update copyright years. 2016-01-04 15:30:50 +01:00
ChangeLog-2015 Update copyright years. 2016-01-04 15:30:50 +01:00
ChangeLog-2016 Update copyright years. 2017-01-01 13:07:43 +01:00
ChangeLog-2017 Update copyright years. 2018-01-03 11:03:58 +01:00
ChangeLog-2018 Update copyright years. 2019-01-01 13:31:55 +01:00
ChangeLog-2019 Update copyright years. 2020-01-01 12:51:42 +01:00
config.h.in libfortran/90038 Reap dead children when wait=.false. 2019-05-19 22:38:11 +03:00
configure Use a non-empty test program to test ability to link. 2020-02-12 13:22:07 -08:00
configure.ac Add `--with-toolexeclibdir=' configuration option 2020-01-24 11:24:25 +00:00
configure.host re PR target/78478 (Compile Error for i386-rtems) 2017-01-19 22:00:53 +01:00
gfortran.map Fix PR fortran/93871 and re-implement degree-valued trigonometric intrinsics. 2020-04-07 13:18:38 -04:00
ISO_Fortran_binding.h Update copyright years. 2020-01-01 12:51:42 +01:00
kinds-override.h Update copyright years. 2020-01-01 12:51:42 +01:00
libgfortran.h Update copyright years. 2020-01-01 12:51:42 +01:00
libgfortran.spec.in
libtool-version re PR fortran/34640 (ICE when assigning item of a derived-component to a pointer) 2017-09-10 17:02:53 +00:00
Makefile.am Fix PR fortran/93871 and re-implement degree-valued trigonometric intrinsics. 2020-04-07 13:18:38 -04:00
Makefile.in Fix PR fortran/93871 and re-implement degree-valued trigonometric intrinsics. 2020-04-07 13:18:38 -04:00
mk-kinds-h.sh
mk-sik-inc.sh
mk-srk-inc.sh