https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113412
--- Comment #1 from kargl at gcc dot gnu.org ---
Ugh. This seems to be by design.
The error message
Error: Too many arguments in call to ‘atan’ at (1)
is queued by intrinsic.cc(sort_actual) and appears to take
precedence over an error queued by check.cc(gfc_check_atan2).
For a robust error message, if looks like we'll need to
special case the one versus to argument atan(), atand(),
and atanpi() cases intrinsic.cc(sort_actual). In pseudocode,
change
whoops:
gfc_error ("Too many arguments in call to %qs at %L", name, where);
return false;
to
whoops:
if (name == "atan")
check for two arguments and issue error
else
above gfc_error()
return false;