[Bug libfortran/103634] Runtime crash with PACK on zero-sized arrays
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Dec 27 20:13:00 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103634
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Harald Anlauf
<anlauf@gcc.gnu.org>:
https://gcc.gnu.org/g:5b3587012951655d8e06dcfe683801862d3979de
commit r9-9889-g5b3587012951655d8e06dcfe683801862d3979de
Author: Harald Anlauf <anlauf@gmx.de>
Date: Mon Dec 13 20:50:19 2021 +0100
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)
More information about the Gcc-bugs
mailing list