https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95107
--- Comment #12 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:6a5628b76380700198f64bf48f57081e6cfc39ed commit r12-9116-g6a5628b76380700198f64bf48f57081e6cfc39ed Author: Harald Anlauf <anl...@gmx.de> Date: Mon Feb 6 20:59:51 2023 +0100 Fortran: ASSOCIATE variables should not be TREE_STATIC [PR95107] gcc/fortran/ChangeLog: PR fortran/95107 * trans-decl.cc (gfc_finish_var_decl): With -fno-automatic, do not make ASSOCIATE variables TREE_STATIC. gcc/testsuite/ChangeLog: PR fortran/95107 * gfortran.dg/save_7.f90: New test. (cherry picked from commit c36f3da534e7f411c5bc48c5b6b660e238167480)