This fixes the bogus DW_AT_abstract_origins in the PR83157 testcase.

Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk 
sofar.

Richard.

2018-01-12  Richard Biener  <rguent...@suse.de>

        PR debug/83157
        * dwarf2out.c (gen_variable_die): Do not reset old_die for
        inline instance vars.

Index: gcc/dwarf2out.c
===================================================================
--- gcc/dwarf2out.c     (revision 255167)
+++ gcc/dwarf2out.c     (working copy)
@@ -21231,10 +21231,8 @@ gen_variable_die (tree decl, tree origin
        {
          /* If we will be creating an inlined instance, we need a
             new DIE that will get annotated with
-            DW_AT_abstract_origin.  Clear things so we can get a
-            new DIE.  */
+            DW_AT_abstract_origin.  */
          gcc_assert (!DECL_ABSTRACT_P (decl));
-         old_die = NULL;
        }
       else
        {

Reply via email to