Commit 20afe640 by Eric Botcazou Committed by Eric Botcazou

ipa-prop.c (compute_complex_ancestor_jump_func): Replace overzealous assertion…

ipa-prop.c (compute_complex_ancestor_jump_func): Replace overzealous assertion with conditional return.

	* ipa-prop.c (compute_complex_ancestor_jump_func): Replace overzealous
	assertion with conditional return.

From-SVN: r207838
parent 2a144f64
2014-02-18 Eric Botcazou <ebotcazou@adacore.com>
* ipa-prop.c (compute_complex_ancestor_jump_func): Replace overzealous
assertion with conditional return.
2014-02-18 Jakub Jelinek <jakub@redhat.com> 2014-02-18 Jakub Jelinek <jakub@redhat.com>
Uros Bizjak <ubizjak@gmail.com> Uros Bizjak <ubizjak@gmail.com>
......
...@@ -1211,7 +1211,8 @@ compute_complex_ancestor_jump_func (struct ipa_node_params *info, ...@@ -1211,7 +1211,8 @@ compute_complex_ancestor_jump_func (struct ipa_node_params *info,
return; return;
parm = TREE_OPERAND (expr, 0); parm = TREE_OPERAND (expr, 0);
index = ipa_get_param_decl_index (info, SSA_NAME_VAR (parm)); index = ipa_get_param_decl_index (info, SSA_NAME_VAR (parm));
gcc_assert (index >= 0); if (index < 0)
return;
cond_bb = single_pred (assign_bb); cond_bb = single_pred (assign_bb);
cond = last_stmt (cond_bb); cond = last_stmt (cond_bb);
......
2014-02-18 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/opt32.adb: New test.
2014-02-18 Janus Weil <janus@gcc.gnu.org> 2014-02-18 Janus Weil <janus@gcc.gnu.org>
PR fortran/60231 PR fortran/60231
......
-- { dg-do compile }
-- { dg-options "-O2" }
with Ada.Containers; use Ada.Containers;
with Ada.Containers.Vectors;
function Opt32 return Natural is
package My_Vectors
is new Vectors (Index_Type => Natural, Element_Type => Integer);
use My_Vectors;
V : Vector;
function Sign_Changes return Natural is
Cur : Cursor := To_Cursor (V, 0);
R : Natural := 0;
Negative : Boolean;
begin
Negative := Element (Cur) < 0;
loop
Cur := Next (Cur);
exit when R > 100;
if (Element (Cur) < 0) /= Negative then
Negative := not Negative;
R := R + 1;
end if;
end loop;
return R;
end;
begin
return Sign_Changes;
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