gcc/libgfortran/intrinsics
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
..
abort.c Update copyright years. 2020-01-01 12:51:42 +01:00
access.c Update copyright years. 2020-01-01 12:51:42 +01:00
args.c Update copyright years. 2020-01-01 12:51:42 +01:00
associated.c Update copyright years. 2020-01-01 12:51:42 +01:00
c99_functions.c Update copyright years. 2020-01-01 12:51:42 +01:00
chdir.c Update copyright years. 2020-01-01 12:51:42 +01:00
chmod.c Update copyright years. 2020-01-01 12:51:42 +01:00
clock.c Update copyright years. 2020-01-01 12:51:42 +01:00
cpu_time.c Update copyright years. 2020-01-01 12:51:42 +01:00
cshift0.c Update copyright years. 2020-01-01 12:51:42 +01:00
ctime.c Update copyright years. 2020-01-01 12:51:42 +01:00
date_and_time.c Update copyright years. 2020-01-01 12:51:42 +01:00
dprod_r8.f90 Update copyright years. 2020-01-01 12:51:42 +01:00
dtime.c Update copyright years. 2020-01-01 12:51:42 +01:00
env.c Update copyright years. 2020-01-01 12:51:42 +01:00
eoshift0.c Update copyright years. 2020-01-01 12:51:42 +01:00
eoshift2.c Update copyright years. 2020-01-01 12:51:42 +01:00
erfc_scaled.c Update copyright years. 2020-01-01 12:51:42 +01:00
erfc_scaled_inc.c Update copyright years. 2020-01-01 12:51:42 +01:00
etime.c Update copyright years. 2020-01-01 12:51:42 +01:00
execute_command_line.c Update copyright years. 2020-01-01 12:51:42 +01:00
exit.c Update copyright years. 2020-01-01 12:51:42 +01:00
extends_type_of.c Update copyright years. 2020-01-01 12:51:42 +01:00
f2c_specifics.F90 Update copyright years. 2020-01-01 12:51:42 +01:00
fnum.c Update copyright years. 2020-01-01 12:51:42 +01:00
gerror.c Update copyright years. 2020-01-01 12:51:42 +01:00
getcwd.c Update copyright years. 2020-01-01 12:51:42 +01:00
getlog.c Update copyright years. 2020-01-01 12:51:42 +01:00
getXid.c Update copyright years. 2020-01-01 12:51:42 +01:00
hostnm.c Update copyright years. 2020-01-01 12:51:42 +01:00
ierrno.c Update copyright years. 2020-01-01 12:51:42 +01:00
is_contiguous.c Update copyright years. 2020-01-01 12:51:42 +01:00
ishftc.c Update copyright years. 2020-01-01 12:51:42 +01:00
kill.c Update copyright years. 2020-01-01 12:51:42 +01:00
link.c Update copyright years. 2020-01-01 12:51:42 +01:00
move_alloc.c Update copyright years. 2020-01-01 12:51:42 +01:00
mvbits.c Update copyright years. 2020-01-01 12:51:42 +01:00
pack_generic.c Update copyright years. 2020-01-01 12:51:42 +01:00
perror.c Update copyright years. 2020-01-01 12:51:42 +01:00
rand.c Update copyright years. 2020-01-01 12:51:42 +01:00
random.c Update copyright years. 2020-01-01 12:51:42 +01:00
random_init.f90 Update copyright years. 2020-01-01 12:51:42 +01:00
rename.c Update copyright years. 2020-01-01 12:51:42 +01:00
reshape_generic.c Update copyright years. 2020-01-01 12:51:42 +01:00
reshape_packed.c Update copyright years. 2020-01-01 12:51:42 +01:00
selected_char_kind.c Update copyright years. 2020-01-01 12:51:42 +01:00
selected_int_kind.f90 Update copyright years. 2020-01-01 12:51:42 +01:00
selected_real_kind.f90 Update copyright years. 2020-01-01 12:51:42 +01:00
signal.c Update copyright years. 2020-01-01 12:51:42 +01:00
size.c Update copyright years. 2020-01-01 12:51:42 +01:00
sleep.c Update copyright years. 2020-01-01 12:51:42 +01:00
spread_generic.c Update copyright years. 2020-01-01 12:51:42 +01:00
stat.c Update copyright years. 2020-01-01 12:51:42 +01:00
string_intrinsics.c Update copyright years. 2020-01-01 12:51:42 +01:00
string_intrinsics_inc.c Update copyright years. 2020-01-01 12:51:42 +01:00
symlnk.c Update copyright years. 2020-01-01 12:51:42 +01:00
system.c Update copyright years. 2020-01-01 12:51:42 +01:00
system_clock.c Update copyright years. 2020-01-01 12:51:42 +01:00
time.c Update copyright years. 2020-01-01 12:51:42 +01:00
time_1.h Update copyright years. 2020-01-01 12:51:42 +01:00
trigd.c Fix PR fortran/93871 and re-implement degree-valued trigonometric intrinsics. 2020-04-07 13:18:38 -04:00
trigd.inc Fix PR fortran/93871 and re-implement degree-valued trigonometric intrinsics. 2020-04-07 13:18:38 -04:00
trigd_lib.inc Fix PR fortran/93871 and re-implement degree-valued trigonometric intrinsics. 2020-04-07 13:18:38 -04:00
umask.c Update copyright years. 2020-01-01 12:51:42 +01:00
unlink.c Update copyright years. 2020-01-01 12:51:42 +01:00
unpack_generic.c Update copyright years. 2020-01-01 12:51:42 +01:00