--- mem2reg.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mem2reg.c b/mem2reg.c index 5f1c968a0..493274df5 100644 --- a/mem2reg.c +++ b/mem2reg.c @@ -100,6 +100,8 @@ static int find_dominating_parents(struct symbol *sym, struct instruction *insn, FOR_EACH_PTR_REVERSE(parent->insns, one) { int dominance; + if (!one->bb) + continue; if (one == insn) goto no_dominance; dominance = dominates(pseudo, insn, one, local); @@ -180,6 +182,8 @@ static int find_dominating_stores(struct symbol *sym, struct instruction *insn, partial = 0; FOR_EACH_PTR(bb->insns, one) { int dominance; + if (!one->bb) + continue; if (one == insn) goto found; dominance = dominates(pseudo, insn, one, local); @@ -250,6 +254,8 @@ static void kill_dead_stores(pseudo_t pseudo, unsigned long generation, struct b FOR_EACH_PTR_REVERSE(bb->insns, insn) { int opcode = insn->opcode; + if (!insn->bb) + continue; if (opcode != OP_LOAD && opcode != OP_STORE) { if (local) continue; -- 2.14.0 -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html