X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fopt%2Freturn.c;h=ebfb2f3c3e5f6df3fc7e07dd662fdc3b6e549e0b;hb=6d3394bf4a3f3c2868634837d70389115cdca589;hp=c91b88f6b9268e6f2ac786034e69feaba31a1bca;hpb=1c0bfd1082fa50a458568831baddbbbc65864fc8;p=libfirm diff --git a/ir/opt/return.c b/ir/opt/return.c index c91b88f6b..ebfb2f3c3 100644 --- a/ir/opt/return.c +++ b/ir/opt/return.c @@ -198,7 +198,8 @@ static int can_move_ret(ir_node *ret) { /* check, that predecessors are Jmps */ n = get_Block_n_cfgpreds(retbl); - if (n <= 1) + /* we cannot move above a labeled block, as this might kill the block */ + if (n <= 1 || has_Block_label(retbl)) return 0; for (i = 0; i < n; ++i) { ir_node *pred = get_Block_cfgpred(retbl, i);