Remove UBSAN in dwarf2out.c (PR tree-optimization/82491).
authorMartin Liska <mliska@suse.cz>
Tue, 3 Apr 2018 13:43:22 +0000 (15:43 +0200)
committerMartin Liska <marxin@gcc.gnu.org>
Tue, 3 Apr 2018 13:43:22 +0000 (13:43 +0000)
2018-04-03  Martin Liska  <mliska@suse.cz>

PR tree-optimization/82491
* rtl.h (strip_offset_and_add): Replace += suboffset with
poly_uint64 () + suboffset.

From-SVN: r259030

gcc/ChangeLog
gcc/rtl.h

index 2a43c39..bac81f8 100644 (file)
@@ -1,3 +1,9 @@
+2018-04-03  Martin Liska  <mliska@suse.cz>
+
+       PR tree-optimization/82491
+       * rtl.h (strip_offset_and_add): Replace += suboffset with
+       poly_uint64 () + suboffset.
+
 2018-03-29  Martin Liska  <mliska@suse.cz>
            Martin Jambor  <mjambor@suse.cz>
 
index f31b4ad..0341ba0 100644 (file)
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -4339,7 +4339,7 @@ strip_offset_and_add (rtx x, poly_int64_pod *offset)
     {
       poly_int64 suboffset;
       x = strip_offset (x, &suboffset);
-      *offset += suboffset;
+      *offset = poly_uint64 (*offset) + suboffset;
     }
   return x;
 }