+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,
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 =>
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.
--- /dev/null
+-- { 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;