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

            Bug ID: 103567
           Summary: Compile error with assumed-rank RESULT variable
           Product: gcc
           Version: 10.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: wileamyp at outlook dot com
  Target Milestone: ---

The following code:

function f() result(y)
  real :: y(..)
end function f

gives a bogus error message at compile time:

assumedrank.f90:1:22:

    1 | function f() result(y)
      |                      1
Error: Assumed-rank array at (1) must be a dummy argument

The same error message is also given with the following code:

function f()
  real :: f(..)
end function f

assumedrank.f90:1:0:

    1 | function f()
      | 
Error: Assumed-rank array at (1) must be a dummy argument

Reply via email to