https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98411
--- Comment #16 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:65ff948e6f8a257ad593256715004eaa41c27011 commit r11-8932-g65ff948e6f8a257ad593256715004eaa41c27011 Author: Harald Anlauf <anl...@gmx.de> Date: Tue Aug 24 21:07:50 2021 +0200 Fortran: fix pointless warning for static variables gcc/fortran/ChangeLog: PR fortran/98411 * trans-decl.c (gfc_finish_var_decl): Adjust check to handle implicit SAVE as well as variables in the main program. Improve warning message text. gcc/testsuite/ChangeLog: PR fortran/98411 * gfortran.dg/pr98411.f90: Adjust testcase options to restrict to F2008, and verify case of implicit SAVE. (cherry picked from commit f95946afd160e2a1f4beac4ee5e6d5633307f39a)