From 8b48488fbe122c3fa56be84fd048846207466eb0 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Thu, 12 Oct 2017 12:09:11 -0600 Subject: [PATCH] tree-ssa-dse.c (valid_ao_ref_for_dse): Reject ao_refs with negative offsets. * tree-ssa-dse.c (valid_ao_ref_for_dse): Reject ao_refs with negative offsets. From-SVN: r253691 --- gcc/ChangeLog | 5 +++++ gcc/tree-ssa-dse.c | 1 + 2 files changed, 6 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index dc17b705025..d5ee088e77f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-10-12 Jeff Law + + * tree-ssa-dse.c (valid_ao_ref_for_dse): Reject ao_refs with + negative offsets. + 2017-10-12 Martin Sebor PR other/82301 diff --git a/gcc/tree-ssa-dse.c b/gcc/tree-ssa-dse.c index 6f58fffc693..87e2fce9ac5 100644 --- a/gcc/tree-ssa-dse.c +++ b/gcc/tree-ssa-dse.c @@ -131,6 +131,7 @@ valid_ao_ref_for_dse (ao_ref *ref) && ref->max_size != -1 && ref->size != 0 && ref->max_size == ref->size + && ref->offset >= 0 && (ref->offset % BITS_PER_UNIT) == 0 && (ref->size % BITS_PER_UNIT) == 0 && (ref->size != -1)); -- 2.30.2