lto: Remove random_seed from section name.
[official-gcc.git] / gcc / testsuite / gfortran.dg / unpack_bounds_2.f90
blobfd049f5abbb90a9fa3f190667dc8d98848aa752f
1 ! { dg-do run }
2 ! { dg-options "-fbounds-check" }
3 ! { dg-shouldfail "Incorrect size of return value in UNPACK intrinsic: should be at least 3, is 2" }
4 program main
5 integer, allocatable, dimension(:) :: vector
6 integer, allocatable, dimension(:,:) :: res
7 logical, allocatable, dimension(:,:) :: mask
9 allocate (vector(2))
10 allocate (mask(2,2))
11 allocate (res(2,2))
13 vector = 1
14 mask = reshape((/ .TRUE., .TRUE., .FALSE., .TRUE. /),(/2,2/))
15 res = unpack(vector, mask, 0)
16 print *,res
17 end program main
18 ! { dg-output "Fortran runtime error: Incorrect size of return value in UNPACK intrinsic: should be at least 3, is 2" }