ICE passing NULL() as procedure argument

Hello,
the following code fails with an ICE, although it should be valid Fortran and is accepted by other compilers:

program p
  implicit none
  integer, pointer :: z(:) => null()
  interface
     subroutine t(y)
       integer, pointer :: y(:)
     end subroutine t
  end interface
  call t(null(z))           ! Valid, we have an explicit interface!
end

Even with the latest nvfortran I get:

NVFORTRAN-F-0000-Internal compiler error. rewrite_sub_args: can't find array      65  (pgi-null.f90: 9)
NVFORTRAN/x86-64 Linux 22.11-0: compilation aborted

Thanks,
Harald

Thanks for the report Harald.

This is a known issue being tracked as TPR #32695. I’ll add you to this report.

-Mat