]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
PR debug/84637
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 17 Apr 2018 22:18:47 +0000 (22:18 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 17 Apr 2018 22:18:47 +0000 (22:18 +0000)
* dbxout.c (dbxout_int): Perform negation in unsigned int type.
(stabstr_D): Change type of unum from unsigned int to
unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
type.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@259451 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/dbxout.c

index bf4f7cc92217d8687e45e47d1b7054f0b82e59e9..2d4966d2a7941b8327217db1bf051f465d2180c7 100644 (file)
@@ -1,3 +1,11 @@
+2018-04-17  Jakub Jelinek  <jakub@redhat.com>
+
+       PR debug/84637
+       * dbxout.c (dbxout_int): Perform negation in unsigned int type.
+       (stabstr_D): Change type of unum from unsigned int to
+       unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
+       type.
+
 2018-04-17  Jim Wilson  <jimw@sifive.com>
 
        PR 84856
index a77e652d3d21884132d04aaf00eea45c042f87af..8157536922435ba24e7d8b21318a8d0faaf92b30 100644 (file)
@@ -464,7 +464,7 @@ dbxout_int (int num)
   if (num < 0)
     {
       putc ('-', asm_out_file);
-      unum = -num;
+      unum = -(unsigned int) num;
     }
   else
     unum = num;
@@ -671,7 +671,7 @@ stabstr_D (HOST_WIDE_INT num)
 {
   char buf[64];
   char *p = buf + sizeof buf;
-  unsigned int unum;
+  unsigned HOST_WIDE_INT unum;
 
   if (num == 0)
     {
@@ -681,7 +681,7 @@ stabstr_D (HOST_WIDE_INT num)
   if (num < 0)
     {
       stabstr_C ('-');
-      unum = -num;
+      unum = -(unsigned HOST_WIDE_INT) num;
     }
   else
     unum = num;