From: Christoph Mallon Date: Thu, 5 May 2011 16:47:40 +0000 (+0200) Subject: Prevent endless recursion in if-conv in endless loops. X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=dc4ccc6cb47c9778f045288840965ab6e5e00933;hp=1ff0ced64d65a6a30aaa98fa5a7f34545df8a967;p=libfirm Prevent endless recursion in if-conv in endless loops. --- diff --git a/ir/opt/ifconv.c b/ir/opt/ifconv.c index 04502fc45..b22c9db08 100644 --- a/ir/opt/ifconv.c +++ b/ir/opt/ifconv.c @@ -283,6 +283,8 @@ restart: ir_cdep* cdep; pred0 = get_Block_cfgpred_block(block, i); + if (pred0 == block) continue; + for (cdep = find_cdep(pred0); cdep != NULL; cdep = get_cdep_next(cdep)) { const ir_node* dependency = get_cdep_node(cdep); ir_node* projx0 = walk_to_projx(pred0, dependency); @@ -310,6 +312,7 @@ restart: dbg_info* cond_dbg; pred1 = get_Block_cfgpred_block(block, j); + if (pred1 == block) continue; if (!is_cdep_on(pred1, dependency)) continue;