http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49112
--- Comment #9 from janus at gcc dot gnu.org 2011-05-30 19:28:52 UTC --- (In reply to comment #3) > Here is a reduced test case for the duplicate SAVE attribute: The duplicate SAVE warning of comment #3 can be fixed with something like this: Index: gcc/fortran/symbol.c =================================================================== --- gcc/fortran/symbol.c (revision 174416) +++ gcc/fortran/symbol.c (working copy) @@ -3400,7 +3400,8 @@ save_symbol (gfc_symbol *sym) if (sym->attr.in_common || sym->attr.dummy || sym->attr.result - || sym->attr.flavor != FL_VARIABLE) + || sym->attr.flavor != FL_VARIABLE + || (sym->name[0]=='_' && sym->name[1]=='_')) return; /* Automatic objects are not saved. */ if (gfc_is_var_automatic (sym)) This prevents 'internal' symbols, starting with '__', from getting a SAVE attribute twice.