fortran parameterised type issue


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:

The same code run with ifort 2019 works as expected.

Any ideas on what might be wrong?


Hi Will,

Apologies for the late response. I was away at a conference and missed your post.

Most like this is a compiler issue so I added a problem report (TPR#27359) and sent it to engineering for further investigation.