The Fortran PACK intrinsic appears to return a rank one array of the same size as its source, regardless of the MASK used. The excess array elements appear uninitialized.
For example:
PACK ((/1,2,3,4/),mask=(/.false.,.true.,.true.,.false./))
will return something that looks like:
(/2,3,-3345345,-5905780/)
when I believe it should return:
(/2,3/)
Is this not correct?
If the current PACK is correct, how do I know how many elements matching my MASK are returned?