https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103634

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Harald Anlauf
<anl...@gcc.gnu.org>:

https://gcc.gnu.org/g:05640d5ca8a20929f30eef41baee3e4a8d85c898

commit r11-9403-g05640d5ca8a20929f30eef41baee3e4a8d85c898
Author: Harald Anlauf <anl...@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)

Reply via email to