Debian Codegraph @

gcc/testsuite/gfortran.dg/unpack_vector_1.f90

raw
1 ! { dg-do compile }
2 ! PR fortran/105813
3 ! Fix checking of VECTOR argument to UNPACK when MASK is a variable.
4 ! Contributed by G.Steinmetz
5
6 program p
7 logical, parameter :: mask(2,2) = reshape ([.true., .true., &
8 .false., .true.], &
9 shape (mask))
10 print *, unpack ([1,2,3], mask, 0) ! OK
11 print *, unpack ([1,2], mask, 0) ! { dg-error "must provide at least" }
12 end