https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98411
--- Comment #17 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:d9887f6d99fe435dd63e1c0eefa820b24c7f4100 commit r10-10071-gd9887f6d99fe435dd63e1c0eefa820b24c7f4100 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)