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

            Bug ID: 87460
           Summary: [F03] accepts-invalid bug with ASSOCIATE and array
                    argument
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: janus at gcc dot gnu.org
  Target Milestone: ---

program p

   implicit none
   integer, dimension(1:9) :: nine

   call sub(nine(1:6))    ! Error: Actual argument contains too few elements

   associate(six => nine(1:6))
      call sub(six)              ! no error here
   end associate

contains

   subroutine sub(arg)
      integer, dimension(1:9) :: arg
   end subroutine

end

Reply via email to