+2016-08-23 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/27336
+ * tree-vrp.c (infer_value_range): Handle stmts that can throw
+ by looking for a non-EH edge.
+ (process_assert_insertions_for): Likewise.
+
2016-08-23 Richard Biener <rguenther@suse.de>
PR middle-end/77305
+2016-08-23 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/27336
+ * c-c++-common/pr27336.c: New testcase.
+
2016-08-22 Marek Polacek <polacek@redhat.com>
PR c++/77321
if (SSA_NAME_OCCURS_IN_ABNORMAL_PHI (op))
return false;
- /* Similarly, don't infer anything from statements that may throw
- exceptions. ??? Relax this requirement? */
- if (stmt_could_throw_p (stmt))
- return false;
-
/* If STMT is the last statement of a basic block with no normal
successors, there is no point inferring anything about any of its
operands. We would not be able to find a proper insertion point
edge e;
FOR_EACH_EDGE (e, ei, gimple_bb (stmt)->succs)
- if (!(e->flags & EDGE_ABNORMAL))
+ if (!(e->flags & (EDGE_ABNORMAL|EDGE_EH)))
break;
if (e == NULL)
return false;
/* If STMT must be the last statement in BB, we can only insert new
assertions on the non-abnormal edge out of BB. Note that since
- STMT is not control flow, there may only be one non-abnormal edge
+ STMT is not control flow, there may only be one non-abnormal/eh edge
out of BB. */
FOR_EACH_EDGE (e, ei, loc->bb->succs)
- if (!(e->flags & EDGE_ABNORMAL))
+ if (!(e->flags & (EDGE_ABNORMAL|EDGE_EH)))
{
gsi_insert_on_edge (e, assert_stmt);
return true;