https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101762
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Harald Anlauf <anl...@gcc.gnu.org>: https://gcc.gnu.org/g:2e63128306ff93d8f53119137dd6c28b2defac94 commit r12-6387-g2e63128306ff93d8f53119137dd6c28b2defac94 Author: Harald Anlauf <anl...@gmx.de> Date: Sun Jan 9 22:08:14 2022 +0100 Fortran: reject invalid non-constant pointer initialization targets gcc/fortran/ChangeLog: PR fortran/101762 * expr.c (gfc_check_pointer_assign): For pointer initialization targets, check that subscripts and substring indices in specifications are constant expressions. gcc/testsuite/ChangeLog: PR fortran/101762 * gfortran.dg/pr101762.f90: New test.