https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103138
--- Comment #6 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:651d84ae6cb4299ea91c701ff8d9a7c67e076570 commit r10-10272-g651d84ae6cb4299ea91c701ff8d9a7c67e076570 Author: Harald Anlauf <anl...@gmx.de> Date: Wed Nov 10 20:30:27 2021 +0100 Fortran: avoid NULL pointer dereferences CLASS(), PARAMETER is not yet properly implemented in gfortran. Using it in declarations could lead to subsequent NULL pointer dereferences during checking or simplification of expressions involving those CLASS variables. gcc/fortran/ChangeLog: PR fortran/103137 PR fortran/103138 * check.c (gfc_check_shape): Avoid NULL pointer dereference on missing ref. * simplify.c (gfc_simplify_cshift): Avoid NULL pointer dereference when shape not set. (gfc_simplify_transpose): Likewise. (cherry picked from commit abc2f01914d6c4703de26c402fb579a9a2d0dba4)