From a3dadf610789784e5fe7e80e3212daa172e1162c Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Tue, 3 Apr 2018 15:43:22 +0200 Subject: [PATCH] Remove UBSAN in dwarf2out.c (PR tree-optimization/82491). 2018-04-03 Martin Liska PR tree-optimization/82491 * rtl.h (strip_offset_and_add): Replace += suboffset with poly_uint64 () + suboffset. From-SVN: r259030 --- gcc/ChangeLog | 6 ++++++ gcc/rtl.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2a43c39..bac81f8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-04-03 Martin Liska + + PR tree-optimization/82491 + * rtl.h (strip_offset_and_add): Replace += suboffset with + poly_uint64 () + suboffset. + 2018-03-29 Martin Liska Martin Jambor diff --git a/gcc/rtl.h b/gcc/rtl.h index f31b4ad..0341ba0 100644 --- 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; } -- 2.7.4