ICE with internal function, procedure pointer and result

While the following sample compiles with nvfortran-21.7:

function f(x)
class(*), pointer :: f
contains
function g()
procedure(f), pointer :: g
end
end

this variant (using a result variable) ICEs:

function f(x)
class(*), pointer :: f
contains
function g() result(z)
procedure(f), pointer :: z
end
end

/work/nvidia/hpc_sdk/Linux_x86_64/21.7/compilers/share/llvm/bin/llc: error: /work/nvidia/hpc_sdk/Linux_x86_64/21.7/compilers/share/llvm/bin/llc: /tmp/nvfortran9ltf316nrlTd.ll:58:51: error: pointers to void are invalid - use i8* instead
%4 = bitcast i64* %__master_entry_rslt333 to void*
^

Thanks,
Harald

Thanks for the report Harald. I was able to reproduce the error and filed an issue report, TPR #30614.

-Mat