]> git.ipfire.org Git - thirdparty/gcc.git/commit
fortran: map atand(y, x) to atan2d(y, x) [PR113413]
authorYuao Ma <c8ef@outlook.com>
Mon, 12 May 2025 15:07:37 +0000 (23:07 +0800)
committerTobias Burnus <tburnus@baylibre.com>
Tue, 13 May 2025 22:34:07 +0000 (00:34 +0200)
commitb239e9cf98ca9238e61e01864ab4dbb5c7f57ce2
treebd54977f690dd39c568d1ad2f73770271534b167
parent9a485b83e177cb742be17faf20ac5cc7db14fee3
fortran: map atand(y, x) to atan2d(y, x) [PR113413]

According to the Fortran standard, atand(y, x) is equivalent to atan2d(y, x).
However, the current atand(y, x) function produces an error. This patch
includes the necessary intrinsic mapping, related test, and intrinsic
documentation.
The minor comment change in intrinsic.cc is cherry-picked from Steve's previous
work.

PR fortran/113413 - ATAND(Y,X) is unsupported

PR fortran/113413

gcc/fortran/ChangeLog:

* intrinsic.cc (do_check): Minor doc polish.
(add_functions): Add atand(y, x) mapping.
* intrinsic.texi: Update atand example.

gcc/testsuite/ChangeLog:

* gfortran.dg/dec_math.f90: Add atand(y, x) testcase.

Signed-off-by: Yuao Ma <c8ef@outlook.com>
Co-authored-by: Steven G. Kargl <kargl@gcc.gnu.org>
gcc/fortran/intrinsic.cc
gcc/fortran/intrinsic.texi
gcc/testsuite/gfortran.dg/dec_math.f90