From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A2FD93858CDA; Thu, 12 Oct 2023 09:06:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A2FD93858CDA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1697101602; bh=XRMf+Q0OKfU7YsvrGko8lqGpnYcO5E9+QKJgCWKLpdI=; h=From:To:Subject:Date:From; b=QYnN73NWMYCzleIUQpvuF9510ddRBr5IYXVWMYkix7PJ+u1kZ+wUA+jgeejJddzap ppydKChGJf7H31q4nvNTYwofblJ04x9eqUzzK7LWs0lkU0Sh2bKspLAe/53B+a88Iq O/AyKuHfaxGl0+4ElcroBQIs08uNWy8PwkxxTCsE= From: "rasmus.vikhamar-sandberg at uit dot no" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/111781] New: Compiler error on valid code Date: Thu, 12 Oct 2023 09:06:41 +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: 12.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rasmus.vikhamar-sandberg at uit dot no 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 attachments.created 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=3D111781 Bug ID: 111781 Summary: Compiler error on valid code Product: gcc Version: 12.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: rasmus.vikhamar-sandberg at uit dot no Target Milestone: --- Created attachment 56092 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D56092&action=3Dedit Minimal fortran program to trigger error message I have attached a minimal Fortran code example.f90 to trigger the compiler error. I ran "gfortran example.f90 -o example.x" and got error message example.f90:8:31: 8 | real, intent(out) :: A(n) | 1 Error: Variable =E2=80=98n=E2=80=99 cannot appear in the expression at (1) If I replace f(g,A) with f(A,g) it compiles. I think the code should be valid Fortran code since explicit-shape arrays t= hat are dummy arguments are allowed to have global variables as bounds.=