Internal compiler error, transpose and matmul

Hi,
The following code does not compile with nvfortran 24.5:

subroutine rotmatInv(imodi,nnode,mnode,ndime,ndof,amatr,bvect,rotma)
  implicit none
  integer(4), intent(in)    :: nnode,mnode,ndime,ndof
  real(8),    intent(in)    :: rotma(ndime,ndime)
!  real(8),    intent(inout) :: amatr(mtott,mtott)
  real(8),    intent(inout) :: amatr(ndof,mnode,ndof,mnode)
  real(8),    intent(inout) :: bvect(ndof,mnode)
  real(8)                   :: transpose_rotma(ndime,ndime)
  integer(4)                :: imodi,inode,jnode
  integer(4)                :: idime,jdime,kdime,idof,jdof
!
! Modifies column number IMODI of AMATR ( A_j,imodi <-- A_j,imodi R )
!
forall(idof=1:ndof,inode=1:nnode)
        amatr(idof,inode,1:ndime,imodi) = matmul(amatr(idof,inode,1:ndime,imodi),transpose(rotma))
end forall

! forall(jdof=1:ndof,jnode=1:nnode)
!         amatr(1:ndime,imodi,jdof,jnode) = matmul(rotma,amatr(1:ndime,imodi,jdof,jnode))
! end forall
!
! bvect(1:ndime,imodi) = matmul(rotma,bvect(1:ndime,imodi))

end subroutine rotmatInv

it returns the error:

NVFORTRAN-W-0000-Internal compiler error. rewrite_sub_args: can not handle PURE arg      68  (test_pointers_nvidia.f90: 15)
NVFORTRAN-S-0000-Internal compiler error. find_array: not subscript or id or member      68  (test_pointers_nvidia.f90: 15)
NVFORTRAN-F-0000-Internal compiler error. find_array: symbol is not ARRAY      70  (test_pointers_nvidia.f90: 15)
NVFORTRAN/x86-64 Linux 24.5-1: compilation aborted

Thanks for the help!

Hi again joan.baiges! I was able to reproduce the ICE you’ve observed and I will report that for you. Thank you for bringing this to our attention! I’ll update you with the internal report number after I have it reported to engineering.

The report number is #35952 - I will update you when engineering makes a fix for this. Thanks again for bringing this to our attention!