diff options
| author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-11-25 09:40:23 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-07 21:04:48 -0700 |
| commit | ea33f8c6c66bbf16c58965b9f5204d111969bf8c (patch) | |
| tree | fe2b3bd7bb06af80568a1e7df76cbb85615baead | |
| parent | 39bd51ab24486386c546b15754ea6e6a39d4be04 (diff) | |
| download | sparse-dev-ea33f8c6c66bbf16c58965b9f5204d111969bf8c.tar.gz | |
Validity-check the pseudo 'use' list.
This is largely how I found all the pseudo rewriting bugs, so
let's just make it the norm. I'm not a huge fan of asserts, but
as long as it's _really_ a "this is a fundamental problem" thing,
rather than a "I'm not handling this case correctly", they're ok.
| -rw-r--r-- | flow.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -10,6 +10,7 @@ #include <stdlib.h> #include <stdio.h> #include <stddef.h> +#include <assert.h> #include "parse.h" #include "expression.h" @@ -145,6 +146,7 @@ void convert_instruction_target(struct instruction *insn, pseudo_t src) */ target = insn->target; FOR_EACH_PTR(target->users, usep) { + assert(*usep == target); *usep = src; } END_FOR_EACH_PTR(usep); concat_user_list(target->users, &src->users); |
