* cse.c (exp_equiv_p) <MEM>: For GCSE, return 0 for expressions with
different trapping status if -fnon-call-exceptions is enabled.
From-SVN: r212879
+2014-07-20 Eric Botcazou <ebotcazou@adacore.com>
+
+ * cse.c (exp_equiv_p) <MEM>: For GCSE, return 0 for expressions with
+ different trapping status if -fnon-call-exceptions is enabled.
+
2014-07-20 Eric Botcazou <ebotcazou@adacore.com>
* expr.c (store_field): Handle VOIDmode for calls that return values
the same attributes share the same mem_attrs data structure. */
if (MEM_ATTRS (x) != MEM_ATTRS (y))
return 0;
+
+ /* If we are handling exceptions, we cannot consider two expressions
+ with different trapping status as equivalent, because simple_mem
+ might accept one and reject the other. */
+ if (cfun->can_throw_non_call_exceptions
+ && (MEM_NOTRAP_P (x) != MEM_NOTRAP_P (y)))
+ return 0;
}
break;