From d938e377b1003470e77280a16e413344c9ea17f6 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Wed, 22 Nov 2017 09:04:47 +0000 Subject: [PATCH] revert: backport: re PR rtl-optimization/82044 (runtime signed integer overflow in check_mem_read_rtx() and all_positions_needed_p() in dse.c) 2017-11-22 Richard Biener Revert 2017-11-21 Martin Liska Backport from mainline 2017-11-21 Martin Liska PR rtl-optimization/82044 PR tree-optimization/82042 * dse.c (check_mem_read_rtx): Check for overflow. From-SVN: r255046 --- gcc/ChangeLog | 12 ++++++++++++ gcc/dse.c | 6 ------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index feb6e64ddf6..91b0bec8582 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,15 @@ +2017-11-22 Richard Biener + + Revert + 2017-11-21 Martin Liska + + Backport from mainline + 2017-11-21 Martin Liska + + PR rtl-optimization/82044 + PR tree-optimization/82042 + * dse.c (check_mem_read_rtx): Check for overflow. + 2017-11-21 Martin Liska Backport from mainline diff --git a/gcc/dse.c b/gcc/dse.c index 6cd1b83d802..f87dd50024e 100644 --- a/gcc/dse.c +++ b/gcc/dse.c @@ -1978,12 +1978,6 @@ check_mem_read_rtx (rtx *loc, bb_info_t bb_info) else width = GET_MODE_SIZE (GET_MODE (mem)); - if (offset > HOST_WIDE_INT_MAX - width) - { - clear_rhs_from_active_local_stores (); - return; - } - read_info = read_info_type_pool.allocate (); read_info->group_id = group_id; read_info->mem = mem;