The executable built by the PGI version 6.2-3 FORTRAN 90 compiler for Windows XP64 fails to work correctly [even for the -g option] if the array argument is of type “character”. It’s probably an incorrect alignment of the character array. If other users need a temporary workaround, they can use “ichar()” to upcast the input character array. This increases dynamically the memory required by a factor of four, but corrects the merge trouble.
Before: mask = merge( mask, char(0), y_array.gt.-9500.)
After: mask = char( merge( ichar(mask), 0, y_array.gt.-9500.))