https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106986
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-12 branch has been updated by Harald Anlauf <anl...@gcc.gnu.org>: https://gcc.gnu.org/g:84a34d76a76f27feabd4523e388068c90c2bb2e4 commit r12-8782-g84a34d76a76f27feabd4523e388068c90c2bb2e4 Author: Harald Anlauf <anl...@gmx.de> Date: Tue Sep 20 22:41:48 2022 +0200 Fortran: error recovery on invalid ARRAY argument to FINDLOC [PR106986] gcc/fortran/ChangeLog: PR fortran/106986 * simplify.cc (gfc_simplify_findloc): Do not try to simplify intrinsic FINDLOC when the ARRAY argument has a NULL shape. gcc/testsuite/ChangeLog: PR fortran/106986 * gfortran.dg/pr106986.f90: New test. (cherry picked from commit 5976fbf9d5dd9542fcb82eebb2185886fd52d000)