where nx is a dummy variable which isn't very large. I'm compiling with -Mlarge_arrays and -mcmodel=medium. Again, I'll do some more investigating, but it strikes me that this is the wrong error message.

The "pgf90_alloc04_i8" message typically means that compiler added a temp array and is trying to allocate it. This can happen when using array syntax since the right-hand side expression needs to be fully evaluated before assigned to the left-hand side. Though, very often the compiler can optimize out the need for a temp array and why this isn't usually a problem.

Why it's happening here, I can't tell from what you've posted. The "i8" indicates that it's trying to allocate an array of INTEGER(8), but "W" is a REAL. Also, expressions with array syntax is just one case where a temp array could be created. So we're missing enough information to give you a good explanation.

Can you please either post or send to PGI Customer Service (trs@pgroup.com) a reproducing example?