X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Firnode_t.h;h=376a68e48503c78913683416a71c90e5edf1cab3;hb=a08e6f04aa3669cff094f94a9484c7c2bb1314d0;hp=ed0a3c98471379e17a981140db3281fa5a3e8b1a;hpb=65daf5bc390b02d68581f4c431dbdbfaae11b88f;p=libfirm diff --git a/ir/ir/irnode_t.h b/ir/ir/irnode_t.h index ed0a3c984..376a68e48 100644 --- a/ir/ir/irnode_t.h +++ b/ir/ir/irnode_t.h @@ -327,7 +327,7 @@ static inline op_pin_state _get_irn_pinned(const ir_node *node) state = _get_op_pinned(_get_irn_op(node)); if (state >= op_pin_state_exc_pinned) - return node->attr.except.pin_state; + return (op_pin_state)node->attr.except.pin_state; return state; } @@ -390,10 +390,14 @@ static inline ir_node *_get_Block_cfgpred(const ir_node *node, int pos) */ static inline ir_node *_get_Block_cfgpred_block(const ir_node *node, int pos) { - ir_node *res = skip_Proj(get_Block_cfgpred(node, pos)); - if (!is_Bad(res)) - res = get_nodes_block(res); - return res; + ir_node *res = get_Block_cfgpred(node, pos); + if (is_Bad(res)) { + /* must return a Bad with mode_BB! */ + ir_graph *irg = get_irn_irg(node); + return new_r_Bad(irg, mode_BB); + } else { + return get_nodes_block(skip_Proj(res)); + } } static inline ir_visited_t _get_Block_block_visited(const ir_node *node)