https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99840
--- Comment #12 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-8 branch has been updated by Harald Anlauf <anl...@gcc.gnu.org>: https://gcc.gnu.org/g:28ba017a7ef5d0d0ebe4a37e52db22f667c1c0e2 commit r8-10828-g28ba017a7ef5d0d0ebe4a37e52db22f667c1c0e2 Author: Harald Anlauf <anl...@gmx.de> Date: Thu Apr 1 07:49:32 2021 +0200 PR fortran/99840 - ICE in gfc_simplify_matmul, at fortran/simplify.c:4777 The simplification of the transposition of a constant array shall properly initialize and set the shape of the result. gcc/fortran/ChangeLog: PR fortran/99840 * simplify.c (gfc_simplify_transpose): Properly initialize resulting shape. gcc/testsuite/ChangeLog: PR fortran/99840 * gfortran.dg/transpose_5.f90: New test. (cherry picked from commit d7cef070bf43bfb3f3d77bac42eadea06c4b0281)