]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
dwarf2out.c (add_data_member_location_attribute): Use add_AT_unsigned instead of...
authorJakub Jelinek <jakub@redhat.com>
Tue, 27 Jul 2010 15:47:43 +0000 (17:47 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 27 Jul 2010 15:47:43 +0000 (17:47 +0200)
* dwarf2out.c (add_data_member_location_attribute): Use
add_AT_unsigned instead of add_AT_int if offset is non-negative.

From-SVN: r162576

gcc/ChangeLog
gcc/dwarf2out.c

index 3ca65bb0d5e599fd388e3a733f982ff41b322134..9399d1ca10e616b270e20bb0e4cdb7b601c0583b 100644 (file)
@@ -1,3 +1,8 @@
+2010-07-27  Jakub Jelinek  <jakub@redhat.com>
+
+       * dwarf2out.c (add_data_member_location_attribute): Use
+       add_AT_unsigned instead of add_AT_int if offset is non-negative.
+
 2010-07-27  Bernd Schmidt  <bernds@codesourcery.com>
 
        * postreload.c (try_replace_in_use): New static function.
index 1ca53bb96c13c5364c6b6fcdc93e7daccb12e1f1..d6751ac1dc2e8aa8e876d982a21cd3ef1f91fcc0 100644 (file)
@@ -15915,7 +15915,10 @@ add_data_member_location_attribute (dw_die_ref die, tree decl)
       if (dwarf_version > 2)
        {
          /* Don't need to output a location expression, just the constant. */
-         add_AT_int (die, DW_AT_data_member_location, offset);
+         if (offset < 0)
+           add_AT_int (die, DW_AT_data_member_location, offset);
+         else
+           add_AT_unsigned (die, DW_AT_data_member_location, offset);
          return;
        }
       else