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

            Bug ID: 64773
           Summary: [F2008]
           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

This is inspired by PR 57023, but it is a pure F2008 error, hence a separate
PR.

program main
  integer :: n
  n = 5
  block
    integer, dimension(n, n) :: a
    a = 0
    n = n - 1
    call baz(a, n)
    print '(5I2)',a
  end block
contains
  subroutine baz(a, i)
    integer, intent(in) :: i
    integer, dimension(i,i), intent(inout) :: a
    a = 1
  end subroutine baz
end program main

ig25@linux-fd1f:~/Krempel/Block> gfortran block.f90
ig25@linux-fd1f:~/Krempel/Block> ./a.out
 1 1 1 1 1
 1 1 1 1 1
 1 1 1 1 1
 1 0 0 0 0
 0 0 0 0 0

Reply via email to