Internal compiler error when using openmp

I recently got the following error while trying to compile a fortran program that contains openMP directives:

PGF90-F-0000-Internal compiler error. more RDFO nodes than DFN nodes

The offending lines of code appear to be

!$OMP PARALLEL SHARED(vnew,allval)
!$OMP WORKSHARE
vnew = maxval(allval,dim=2)
!$OMP END WORKSHARE
!$OMP END PARALLEL

Interestingly, if I remove the mask in the maxval function and replace the third line with something like

vnew(1,1) = maxval(allval)

the program compiles just fine. Of course, the program doesn’t do what I want it to if I make that substitution, but I thought it might be useful for diagnostic purposes.

Notes: vnew is a 2 dimensional array and allval is a three dimensional array

Hi dodes,

Which compiler version are you using? We had a report against the 12.4 compiler release with the same error that was fixed in the 12.6 release.

If you are using a more recent version of the compiler, can you please send a reproducing example to PGI Customer Support (trs@pgroup.com)?

Thanks,
Mat