https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103138
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-11 branch has been updated by Harald Anlauf <anl...@gcc.gnu.org>: https://gcc.gnu.org/g:9ccc4f79f1a6dd08437e10db729694a744abb10a commit r11-9235-g9ccc4f79f1a6dd08437e10db729694a744abb10a 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)