diff options
| author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-11-28 12:37:23 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-07 21:05:10 -0700 |
| commit | f4b2e9f3721f06f5eb5896bf44c4e994d9a67203 (patch) | |
| tree | 5241536a830a1523c92786e1b122b8bcad21bb4f | |
| parent | 9c9b53ee5521b9df5cb54f23a1642145de0f47e2 (diff) | |
| download | sparse-dev-f4b2e9f3721f06f5eb5896bf44c4e994d9a67203.tar.gz | |
Check switch and computed goto target lists too when verifying.
And don't remove a parent from a list when "rewrite_parent_brach()"
should already have updated the flow properly.
| -rw-r--r-- | flow.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -706,7 +706,6 @@ static struct basic_block * rewrite_branch_bb(struct basic_block *bb, struct ins while ((parent = first_basic_block(bb->parents)) != NULL) { if (!rewrite_parent_branch(parent, bb, target)) return NULL; - remove_bb_from_list(&bb->parents, parent, 0); } return target; } @@ -779,10 +778,17 @@ static void vrfy_children(struct basic_block *bb) return; } switch (br->opcode) { + struct multijmp *jmp; case OP_BR: vrfy_bb_in_list(br->bb_true, bb->children); vrfy_bb_in_list(br->bb_false, bb->children); break; + case OP_SWITCH: + case OP_COMPUTEDGOTO: + FOR_EACH_PTR(br->multijmp_list, jmp) { + vrfy_bb_in_list(jmp->target, bb->children); + } END_FOR_EACH_PTR(jmp); + break; default: break; } |
