https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96624
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Paul Thomas <pa...@gcc.gnu.org>: https://gcc.gnu.org/g:9d463ce7f983f03f0d65da03cfa430e29a0840c2 commit r11-2919-g9d463ce7f983f03f0d65da03cfa430e29a0840c2 Author: Paul Thomas <pa...@gcc.gnu.org> Date: Fri Aug 28 09:02:58 2020 +0100 This patch fixes PR96624. 2020-08-28 Paul Thomas <pa...@gcc.gnu.org> gcc/fortran PR fortran/96624 * simplify.c (gfc_simplify_reshape): Detect zero shape and clear index if found. gcc/testsuite/ PR fortran/96624 * gfortran.dg/reshape_8.f90 : New test.