Commit a8697b27 by Eric Botcazou

gimple.c (gimple_assign_set_rhs_with_ops): Do not ask gsi_replace to update EH info here.

	* gimple.c (gimple_assign_set_rhs_with_ops): Do not ask gsi_replace
	to update EH info here.
ada/
	* checks.adb (Apply_Divide_Checks): Ensure that operands are not
	evaluated twice.

From-SVN: r250525
parent 288fe52e
2017-07-25 Eric Botcazou <ebotcazou@adacore.com>
* gimple.c (gimple_assign_set_rhs_with_ops): Do not ask gsi_replace
to update EH info here.
2017-07-25 Alexander Monakov <amonakov@ispras.ru>
* match.pd ((X * CST1) * CST2): Simplify to X * (CST1 * CST2).
......
2017-07-25 Javier Miranda <miranda@adacore.com>
* checks.adb (Apply_Divide_Checks): Ensure that operands are not
evaluated twice.
2017-07-19 Jakub Jelinek <jakub@redhat.com>
* gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE,
......
......@@ -1818,6 +1818,13 @@ package body Checks is
and then
((not LOK) or else (Llo = LLB))
then
-- Ensure that expressions are not evaluated twice (once
-- for their runtime checks and once for their regular
-- computation).
Force_Evaluation (Left, Mode => Strict);
Force_Evaluation (Right, Mode => Strict);
Insert_Action (N,
Make_Raise_Constraint_Error (Loc,
Condition =>
......
......@@ -1613,7 +1613,7 @@ gimple_assign_set_rhs_with_ops (gimple_stmt_iterator *gsi, enum tree_code code,
gimple *new_stmt = gimple_alloc (gimple_code (stmt), new_rhs_ops + 1);
memcpy (new_stmt, stmt, gimple_size (gimple_code (stmt)));
gimple_init_singleton (new_stmt);
gsi_replace (gsi, new_stmt, true);
gsi_replace (gsi, new_stmt, false);
stmt = new_stmt;
/* The LHS needs to be reset as this also changes the SSA name
......
2017-07-25 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/opt66.adb: New test.
2017-07-25 Alexander Monakov <amonakov@ispras.ru>
* gcc.dg/tree-ssa/assoc-2.c: Enhance.
......
-- { dg-do compile }
-- { dg-options "-O" }
procedure Opt66 (I : Integer) is
E : exception;
begin
if I = 0 then
raise E;
end if;
Opt66 (I - I / abs (I));
exception
when others => null;
end;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment