public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rasmus.vikhamar-sandberg at uit dot no" <gcc-bugzilla@gcc.gnu.org> 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 [thread overview] Message-ID: <bug-111781-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111781 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=56092&action=edit 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 ‘n’ 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 that are dummy arguments are allowed to have global variables as bounds.
next reply other threads:[~2023-10-12 9:06 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-10-12 9:06 rasmus.vikhamar-sandberg at uit dot no [this message] 2023-10-12 10:16 ` [Bug fortran/111781] Fortran compiler complains about variable bound in array dummy argument mikael at gcc dot gnu.org 2023-10-21 14:01 ` mikael at gcc dot gnu.org 2023-10-21 16:37 ` mikael at gcc dot gnu.org 2024-02-06 18:19 ` anlauf at gcc dot gnu.org 2024-02-28 18:25 ` anlauf at gcc dot gnu.org 2024-02-28 19:38 ` mikael at gcc dot gnu.org 2024-03-15 19:37 ` mikael at gcc dot gnu.org 2024-03-15 19:57 ` anlauf at gcc dot gnu.org 2024-03-15 20:25 ` mikael at gcc dot gnu.org 2024-03-22 12:07 ` cvs-commit at gcc dot gnu.org 2024-03-28 10:40 ` cvs-commit at gcc dot gnu.org 2024-04-02 13:15 ` mikael at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-111781-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).