Dear all, I had thought that we had fixed this in the past (see PR31001), but it did fail for me with all gcc versions I have tried (7-12) for a slightly more elaborate case as in the old testcase. The loop in pack_internal did try to access the first element of the array argument to PACK even if one (or more) extents were zero. This is not good. Solution: check the extents and return early. (We already do a related check for the vector argument if present). Regtested on x86_64-pc-linux-gnu. OK for mainline? As this segfaults on valid code at runtime: I am considering backporting this, if there are no objections. Thanks, Harald