dwarf2out.c (gen_member_die): Only reparent_child instead of splice_child_die if...
authorJakub Jelinek <jakub@redhat.com>
Thu, 27 Oct 2016 13:57:47 +0000 (15:57 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 27 Oct 2016 13:57:47 +0000 (15:57 +0200)
* dwarf2out.c (gen_member_die): Only reparent_child instead of
splice_child_die if child doesn't have DW_AT_specification attribute.

From-SVN: r241622

gcc/ChangeLog
gcc/dwarf2out.c

index c93a12e4f2a72c7d3f44c338be835b7fcce018c8..9eea9a3b7a3113faa0bca8cfc88e19f9a715369b 100644 (file)
@@ -1,3 +1,8 @@
+2016-10-27  Jakub Jelinek  <jakub@redhat.com>
+
+       * dwarf2out.c (gen_member_die): Only reparent_child instead of
+       splice_child_die if child doesn't have DW_AT_specification attribute.
+
 2016-10-27  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
        * config/arm/arm.h (TARGET_HAVE_LDREX): Define for ARMv8-M Baseline.
index 515ee6e4261e4a2b5e866cfd561e802d513c546b..78a29799564cd6a202c175a54d7cb4fda4d2217f 100644 (file)
@@ -22624,7 +22624,8 @@ gen_member_die (tree type, dw_die_ref context_die)
          /* Handle inline static data members, which only have in-class
             declarations.  */
          if (child->die_tag == DW_TAG_variable
-             && child->die_parent == comp_unit_die ())
+             && child->die_parent == comp_unit_die ()
+             && get_AT (child, DW_AT_specification) == NULL)
            {
              reparent_child (child, context_die);
              child->die_tag = DW_TAG_member;