aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/flow.c
diff options
authorLinus Torvalds <torvalds@ppc970.osdl.org>2004-11-25 16:05:43 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-07 21:04:53 -0700
commitc77fe51e2ae1d43917d8189111238151f0bc6648 (patch)
tree7e061828c8b4df7a21473b39182279e8c4253769 /flow.c
parent8fb259b19b1dea6981031f206d737e73bb7ec382 (diff)
downloadsparse-dev-c77fe51e2ae1d43917d8189111238151f0bc6648.tar.gz
Once again, remember that basic blocks may not have any instructions.
Diffstat (limited to 'flow.c')
-rw-r--r--flow.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/flow.c b/flow.c
index 826c4b74..9c6492ab 100644
--- a/flow.c
+++ b/flow.c
@@ -696,7 +696,7 @@ static void simplify_switch(struct entrypoint *ep)
pseudo_t pseudo;
struct instruction *insn = last_instruction(bb->insns);
- if (insn->opcode != OP_SWITCH)
+ if (!insn || insn->opcode != OP_SWITCH)
continue;
pseudo = insn->target;
if (pseudo->type == PSEUDO_VAL)