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

            Bug ID: 92004
           Summary: [10 Regression] Rejection of different ranks for dummy
                    array argument where actual argument is an element
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tkoenig at gcc dot gnu.org
  Target Milestone: ---

From F18, 15.5.2.4 Ordinary dummy variables

14 If the actual argument is a noncoindexed scalar, the
corresponding dummy argument shall be scalar unless the actual
argument is default character, of type character with the
C character kind (18.2.2), or is an element or substring of an
element of an array that is not an assumed-shape, pointer, or
polymorphic array, the dummy argument has assumed-rank, or the
dummy argument is an assumed-type assumed-size array. 

So, this is actually legal:

subroutine baz
  real x(10,10)
  call bar(x(2,2))
  call bar(x)
end subroutine baz

Reply via email to