diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2017-02-16 05:57:05 +0100 |
|---|---|---|
| committer | Christopher Li <sparse@chrisli.org> | 2017-02-16 20:43:10 +0800 |
| commit | 700ab906a3842184cf48031a575341e4aae6efb4 (patch) | |
| tree | 35d240009ae5a41d955451d8955e73257e6f665c /validation | |
| parent | 2e9471d51289b7b67090ee06c475fe7d2b8e6ede (diff) | |
| download | sparse-dev-700ab906a3842184cf48031a575341e4aae6efb4.tar.gz | |
fix killing of rewritten loads
OP_LOADs removed by rewrite_load_instruction() had their ->bb simply
set to NULL the usage of its operand was not adjusted.
Fix that by calling kill_instruction().
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Signed-off-by: Christopher Li <sparse@chrisli.org>
Diffstat (limited to 'validation')
| -rw-r--r-- | validation/kill-rewritten-load.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/validation/kill-rewritten-load.c b/validation/kill-rewritten-load.c new file mode 100644 index 00000000..31b895e5 --- /dev/null +++ b/validation/kill-rewritten-load.c @@ -0,0 +1,16 @@ +int foo(int i) +{ + i++; + if (i && 0) + i; + return 0; +} + + +/* + * check-name: kill-rewritten-load + * check-command: test-linearize -Wno-decl $file + * check-output-ignore + * + * check-output-excludes: add\\. + */ |
