public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/113412] New: ATAN(Y,X) does not check arguments and generates wrong error message.
@ 2024-01-16  2:13 kargl at gcc dot gnu.org
  2024-01-16  2:13 ` [Bug fortran/113412] " kargl at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: kargl at gcc dot gnu.org @ 2024-01-16  2:13 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113412

            Bug ID: 113412
           Summary: ATAN(Y,X) does not check arguments and generates wrong
                    error message.
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: kargl at gcc dot gnu.org
  Target Milestone: ---

Fortran 2008 added the misguided form ATAN(Y,X) where Y could be missing.
However, if Y is present, then X is required to have the same type and
kind as Y.

Consider,

% cat a.f90
program main
   real(4) x
   real(8) y
   x = 1.
   y = x
   print*, atan(y,x), atan2(y,x)
end


% gfcx -o z a.f90
a.f90:6:10:

    6 |    print*, atan(y,x), atan2(y,x)
      |          1
Error: Too many arguments in call to ‘atan’ at (1)
a.f90:6:30:

    6 |    print*, atan(y,x), atan2(y,x)
      |                              1
Error: ‘x’ argument of ‘atan2’ intrinsic at (1) must be the same type
and kind as ‘y’

The error message for atan(y,x) is wrong.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-04-04  5:03 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-16  2:13 [Bug fortran/113412] New: ATAN(Y,X) does not check arguments and generates wrong error message kargl at gcc dot gnu.org
2024-01-16  2:13 ` [Bug fortran/113412] " kargl at gcc dot gnu.org
2024-01-16 20:25 ` kargl at gcc dot gnu.org
2024-01-16 20:44 ` kargl at gcc dot gnu.org
2024-01-17  0:46 ` kargl at gcc dot gnu.org
2024-04-02 20:20 ` anlauf at gcc dot gnu.org
2024-04-02 22:15 ` kargls at comcast dot net
2024-04-03 20:12 ` anlauf at gcc dot gnu.org
2024-04-04  5:03 ` kargls at comcast dot net

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).