diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 76cb51b55a4..ed75ea8eaf2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2017-01-04 Jeff Law + + PR tree-optimization/79007 + PR tree-optimization/67955 + * tree-ssa-alias.c (same_addr_size_stores_p): Only need to be + conservative for pt.null when flag_non_call_exceptions is on. + 2017-01-09 Jakub Jelinek PR translation/79019 diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c index 871fa121fd0..83fa6f55aca 100644 --- a/gcc/tree-ssa-alias.c +++ b/gcc/tree-ssa-alias.c @@ -2373,9 +2373,9 @@ same_addr_size_stores_p (tree base1, HOST_WIDE_INT offset1, HOST_WIDE_INT size1, || !pt_solution_singleton_or_null_p (&pi->pt, &pt_uid)) return false; - /* If the solution has a singleton and NULL, then we can not - be sure that the two stores hit the same address. */ - if (pi->pt.null) + /* Be conservative with non-call exceptions when the address might + be NULL. */ + if (flag_non_call_exceptions && pi->pt.null) return false; /* Check that ptr points relative to obj. */