2 ! { dg-options "-fbounds-check" }
3 ! { dg-shouldfail "Incorrect size of return value in UNPACK intrinsic: should be at least 3, is 2" }
5 integer, allocatable, dimension(:) :: vector
6 integer, allocatable, dimension(:,:) :: res
7 integer, allocatable, dimension(:,:) :: field
8 logical, allocatable, dimension(:,:) :: mask
17 mask = reshape((/ .TRUE., .TRUE., .FALSE., .TRUE. /),(/2,2/))
18 res = unpack(vector, mask, field)
21 ! { dg-output "Fortran runtime error: Incorrect extent in FIELD of UNPACK intrinsic in dimension 1: is 3, should be 2" }