https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103717
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-10 branch has been updated by Harald Anlauf <anl...@gcc.gnu.org>: https://gcc.gnu.org/g:b99da5f23e122af800c1fca77e03664e686ae575 commit r10-10343-gb99da5f23e122af800c1fca77e03664e686ae575 Author: Harald Anlauf <anl...@gmx.de> Date: Tue Dec 14 21:57:04 2021 +0100 Fortran: prevent NULL pointer dereference in check of passed do-loop variable gcc/fortran/ChangeLog: PR fortran/103717 * frontend-passes.c (doloop_code): Prevent NULL pointer dereference when checking for passing a do-loop variable to a contained procedure with an interface mismatch. gcc/testsuite/ChangeLog: PR fortran/103717 * gfortran.dg/do_check_19.f90: New test. (cherry picked from commit ca39102e10643a6b3f07d06934cc0907ba83d9ee)