diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-11-29 12:42:15 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-07 21:05:16 -0700 |
commit | 53fab69297147a31f548189ad1c4f699bd925966 (patch) | |
tree | 318fe12348528d88310f05c0ba8a2c527b482fd5 /simplify.c | |
parent | Rename "register.c" into "liveness.c". That's what it does. (diff) | |
download | sparse-53fab69297147a31f548189ad1c4f699bd925966.tar.gz sparse-53fab69297147a31f548189ad1c4f699bd925966.tar.bz2 sparse-53fab69297147a31f548189ad1c4f699bd925966.zip |
Don't go off into infinite loops when some undefined program
updates a variable where the only def is the update itself.
Testcase from Alexey Dobriyan
Diffstat (limited to 'simplify.c')
-rw-r--r-- | simplify.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -441,6 +441,13 @@ static int simplify_memop(struct instruction *insn) return 0; offset: + /* Invalid code */ + if (new == addr) { + if (new == VOID) + return 0; + new = VOID; + warning(insn->bb->pos, "crazy programmer"); + } insn->offset += off->value; use_pseudo(new, &insn->src); remove_usage(addr, &insn->src); |