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.