Patchwork Fix PR 55063: Check whether DIE is already a declaration

login
register
mail settings
Submitter Cary Coutant
Date Oct. 25, 2012, 6:31 p.m.
Message ID <CAHACq4o6G8ftfzAOooOkqbNXFXk_4BCxdOj9OXyF947WUrSDXg@mail.gmail.com>
Download mbox | patch
Permalink /patch/194264/
State New
Headers show

Comments

Cary Coutant - Oct. 25, 2012, 6:31 p.m.
I've committed the following fix for PR 55063:

-cary


2012-10-25  Cary Coutant  <ccoutant@google.com>

        PR debug/55063
        * dwarf2out.c (prune_unused_types_prune): Check whether DIE is
        already a declaration.

Patch

Index: dwarf2out.c
===================================================================
--- dwarf2out.c (revision 192817)
+++ dwarf2out.c (working copy)
@@ -21259,7 +21259,8 @@  prune_unused_types_prune (dw_die_ref die
   /* If we pruned children, and this is a class, mark it as a
      declaration to inform debuggers that this is not a complete
      class definition.  */
-  if (pruned && die->die_mark == 1 && class_scope_p (die))
+  if (pruned && die->die_mark == 1 && class_scope_p (die)
+      && ! is_declaration_die (die))
     add_AT_flag (die, DW_AT_declaration, 1);
 }