I get the following error message when compiling with version 5.0-2:
Lowering Error: symbol iv$sd is a member reference
PGF90-F-0000-Internal compiler error. Errors in Lowering 1 (bdiv.f90: 484)
PGF90/x86 nt86 5.0-2: compilation aborted
Unfortunately, I can not use later versions of the compiler as I am using Visual numerics math/stats libraries which are not accepted by later versions of the compiler (I get a message to re-compile the modules).