]> gcc.gnu.org Git - gcc.git/commit
Fortran: PACK intrinsic should not try to read from zero-sized array
authorHarald Anlauf <anlauf@gmx.de>
Mon, 13 Dec 2021 19:50:19 +0000 (20:50 +0100)
committerHarald Anlauf <anlauf@gmx.de>
Mon, 27 Dec 2021 20:08:02 +0000 (21:08 +0100)
commit39264acd7daaff4659fefa005ec02bccf685447d
treeb7f80f3418dc2f68bf23120c7b9b5d250adb5efa
parent715842b02f8828f28affdbb5e164013c172a3fb9
Fortran: PACK intrinsic should not try to read from zero-sized array

libgfortran/ChangeLog:

PR libfortran/103634
* intrinsics/pack_generic.c (pack_internal): Handle case when the
array argument of PACK has one or more extents of size zero to
avoid invalid reads.

gcc/testsuite/ChangeLog:

PR libfortran/103634
* gfortran.dg/intrinsic_pack_6.f90: New test.

(cherry picked from commit 1c613165a55b212c59a83796b20a1d555e096504)
gcc/testsuite/gfortran.dg/intrinsic_pack_6.f90 [new file with mode: 0644]
libgfortran/intrinsics/pack_generic.c
This page took 0.066559 seconds and 5 git commands to generate.