When attempting to use allocatable parameterised types in Fortran I run into an issue with the compiler (PGI 19.4).
There’s no problem if the variable is used in the routine where it is defined and allocated, but if it gets passed to a subroutine the compiler gives the error
PGF90-F-0000-Internal compiler error. mk_mem_ptr_shape: lwb not subs followed by a number.
An example that reproduces the error can be found here: https://drive.google.com/drive/folders/1RCGu06Dw6E2Zz_UvwTElUbrEnmyczvG2?usp=sharing
The same code run with ifort 2019 works as expected.
Any ideas on what might be wrong?