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

--- Comment #4 from Martin Diehl <m.diehl at mpie dot de> ---
The same error occurs for the dimension attribute and real variables

gfortran -c test_module.f90
test_module.f90:20:27:

     real, dimension(2) :: p
                           1
Error: Duplicate DIMENSION attribute specified at (1)


module test_module
  interface
    module function p(a)
      real, dimension(2) :: p
      real :: a
     end function p

    module function p2(a)
      real :: p2
      real :: a
     end function p2
  end interface

end module test_module

submodule(test_module) test_submodule

contains
  module function p(a)
    real, dimension(2) :: p ! does not work
    real :: a
    p = [a,a+1.0]
  end function p

  module function p2(a)
    real :: p2
    real :: a
    p2 = a
  end function p2

end submodule test_submodule

Reply via email to