[flang-commits] [flang] [flang] Catch attempts to subscribe empty arrays (PR #108246)

Paul Osmialowski via flang-commits flang-commits at lists.llvm.org
Wed Nov 20 17:31:53 PST 2024


pawosm-arm wrote:

Sadly, we're observing a regression after this one. The following snippet compiles with classic flang and gfortran, while it fails on the new flang after this commit:

```
module failing
  implicit none
  integer,                public, parameter  :: H = 32
  integer,                private, parameter :: VMAX = 0
  character(len=H),       private            :: VAR_NAME(VMAX)
contains
  subroutine sub
    implicit none
    integer :: iv
    do iv = 1, VMAX
      print *, VAR_NAME(iv)
    end do
  end subroutine
end module
```
This is surprisingly common in large codebases.


https://github.com/llvm/llvm-project/pull/108246


More information about the flang-commits mailing list