Nvfortran 21.1-0, NVFORTRAN-S-0000-Internal compiler error. mk_id: invalid symbol table index

Encountered errors compiling with nvfortran 21.1-0 :

NVFORTRAN-S-0000-Internal compiler error. mk_id: invalid symbol table index 0 (ice-20210224.F90: 9)
NVFORTRAN-S-0000-Internal compiler error. lower_sptr: bad sptr 0 (ice-20210224.F90: 14)

The following is a session log that includes a small reproducer for the error:

Script started on Wed 24 Feb 2021 04:51:26 PM MST
:: WARNING: setvars.sh has already been run. Skipping re-execution.
   To force a re-execution of setvars.sh, use the '--force' option.
   Using '--force' can result in excessive use of your environment variables.
$ pgf90 -V

pgf90 (aka nvfortran) 21.1-0 LLVM 64-bit target on x86-64 Linux -tp sandybridge
PGI Compilers and Tools
Copyright (c) 2020, NVIDIA CORPORATION.  All rights reserved.
$ cat ice-20210224.F90
module mod_x
  implicit none
  real,dimension(7), parameter :: lps = [-0.0065, 0.0, 0.001, 0.0028, 0.0, -0.0028, -0.002]
  contains
  subroutine sa
    integer             :: i
    !real, dimension(7)  :: tl
    real  :: tl
    associate( ll  => lps  )
    do i=2,7
      tl=tl+ll(i-1)
    end do
    end associate
  end subroutine sa
end module mod_x
$ pgf90 -c ice-20210224.F90
NVFORTRAN-S-0000-Internal compiler error. mk_id: invalid symbol table index       0  (ice-20210224.F90: 9)
NVFORTRAN-S-0000-Internal compiler error. lower_sptr: bad sptr       0  (ice-20210224.F90: 14)
  0 inform,   0 warnings,   2 severes, 0 fatal for sa
$ ifort -c ice-20210224.F90
$ exit
exit

Thank you,
John Michalakes
michalak@ucar.edu

Thanks John. I’ve added a problem report, TPR #29658, and sent it to engineering for further investigation.

-Mat