re PR tree-optimization/79007 (gcc.dg/tree-ssa/dse-points-to.c fails starting with...
authorJeff Law <law@redhat.com>
Mon, 9 Jan 2017 21:53:02 +0000 (14:53 -0700)
committerJeff Law <law@gcc.gnu.org>
Mon, 9 Jan 2017 21:53:02 +0000 (14:53 -0700)
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.

From-SVN: r244247

gcc/ChangeLog
gcc/tree-ssa-alias.c

index 76cb51b..ed75ea8 100644 (file)
@@ -1,3 +1,10 @@
+2017-01-04  Jeff Law  <law@redhat.com>
+
+       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  <jakub@redhat.com>
 
        PR translation/79019
index 871fa12..83fa6f5 100644 (file)
@@ -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.  */