Fortran: fix checking of arguments to UNPACK when MASK is a variable [PR105813]
authorHarald Anlauf <anlauf@gmx.de>
Fri, 24 Jun 2022 20:21:39 +0000 (22:21 +0200)
committerHarald Anlauf <anlauf@gmx.de>
Thu, 30 Jun 2022 20:00:38 +0000 (22:00 +0200)
commiteb4336f546b2a770717af608c79b4d46f45ef7c2
tree94375094327ca6f0f89aced07c7f90e6647350eb
parent5cf7ffe3be84d486a002b04c5664009ef5bc849d
Fortran: fix checking of arguments to UNPACK when MASK is a variable [PR105813]

gcc/fortran/ChangeLog:

PR fortran/105813
* check.cc (gfc_check_unpack): Try to simplify MASK argument to
UNPACK so that checking of the VECTOR argument can work when MASK
is a variable.

gcc/testsuite/ChangeLog:

PR fortran/105813
* gfortran.dg/unpack_vector_1.f90: New test.

(cherry picked from commit f21f17f95c0237f4f987a5fa9f1fa9c7e0db3c40)
gcc/fortran/check.cc
gcc/testsuite/gfortran.dg/unpack_vector_1.f90 [new file with mode: 0644]