OSDN Git Service

Fix for PR debug/43325
[pf3gnuchains/gcc-fork.git] / gcc / dwarf2out.c
index 86ae89b..5faa58c 100644 (file)
@@ -18283,9 +18283,9 @@ gen_variable_die (tree decl, tree origin, dw_die_ref context_die)
 
   /* If the compiler emitted a definition for the DECL declaration
      and if we already emitted a DIE for it, don't emit a second
-     DIE for it again.  */
-  if (old_die
-      && declaration)
+     DIE for it again. Allow re-declarations of DECLs that are
+     inside functions, though.  */
+  if (old_die && declaration && !local_scope_p (context_die))
     return;
 
   /* For static data members, the declaration in the class is supposed