From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 38AE63858CDB; Tue, 16 Jan 2024 02:13:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 38AE63858CDB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1705371194; bh=5cidRFiQe+m7tm4RbNLqVQmhItsAvP5riX8sLd6ZYrQ=; h=From:To:Subject:Date:From; b=uVh8NWP6v8myyKc7vX4SmWYEllefYk3QC48Yy7U33zIokKLuZRih615n/Cayfs346 CLDf8SjTM54LZxfTotnfG6wk9Oz5XfgmlHHCAMWSsMe97yk3pFei47+DBH7bTtkvJD dosGq/eEqWq/mrKLSBSscJnnBIVmE2uQT6BAyxgg= From: "kargl at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/113412] New: ATAN(Y,X) does not check arguments and generates wrong error message. Date: Tue, 16 Jan 2024 02:13:13 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: kargl at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113412 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 =3D 1. y =3D 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 =E2=80=98atan=E2=80=99 at (1) a.f90:6:30: 6 | print*, atan(y,x), atan2(y,x) | 1 Error: =E2=80=98x=E2=80=99 argument of =E2=80=98atan2=E2=80=99 intrinsic at= (1) must be the same type and kind as =E2=80=98y=E2=80=99 The error message for atan(y,x) is wrong.=