]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fortran: error recovery simplifying PACK with invalid arguments [PR106049]
authorHarald Anlauf <anlauf@gmx.de>
Tue, 5 Jul 2022 20:20:05 +0000 (22:20 +0200)
committerHarald Anlauf <anlauf@gmx.de>
Tue, 12 Jul 2022 17:18:19 +0000 (19:18 +0200)
commit6e9d5dfc2911e3acc6039ebfe3837e7ba4be197f
tree389eb082131642ae3cf61d359c38b838a379beee
parentcab411a2b4b4f6a6b619d0650fade85288a31f9e
Fortran: error recovery simplifying PACK with invalid arguments [PR106049]

gcc/fortran/ChangeLog:

PR fortran/106049
* simplify.cc (is_constant_array_expr): A non-zero-sized constant
array shall have a non-empty constructor.  When the constructor is
empty or missing, treat as non-constant.

gcc/testsuite/ChangeLog:

PR fortran/106049
* gfortran.dg/pack_simplify_1.f90: New test.
gcc/fortran/simplify.cc
gcc/testsuite/gfortran.dg/pack_simplify_1.f90 [new file with mode: 0644]