http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59440

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |burnus at gcc dot 
gnu.org

--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Confirmed - also occurs when the namelist is in a procedure - and the problem
is independent whether it is USE associated with and without ONLY.


Lightly tested draft patch:

--- a/gcc/fortran/trans-decl.c
+++ b/gcc/fortran/trans-decl.c
@@ -4164,6 +4164,7 @@ generate_namelist_decl (gfc_symbol * sym)
          nml->sym->attr.referenced = 1;
          nml->sym->backend_decl = gfc_get_symbol_decl (nml->sym);
        }
+      DECL_IGNORED_P (nml->sym->backend_decl) = 0;
       CONSTRUCTOR_APPEND_ELT (nml_decls, NULL_TREE, nml->sym->backend_decl);
     }

Reply via email to