https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102717
--- 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:6fa3c73e88ccbb6fffb4169bcab830fc3f4f3c9a commit r11-9358-g6fa3c73e88ccbb6fffb4169bcab830fc3f4f3c9a Author: Harald Anlauf <anl...@gmx.de> Date: Thu Oct 14 20:19:50 2021 +0200 Fortran: generate error message for negative elements in SHAPE array gcc/fortran/ChangeLog: PR fortran/102717 * simplify.c (gfc_simplify_reshape): Replace assert by error message for negative elements in SHAPE array. gcc/testsuite/ChangeLog: PR fortran/102717 * gfortran.dg/reshape_shape_2.f90: New test. (cherry picked from commit b47490c572c5938f887b54240af6096a7c90f640)