diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2017-02-16 05:56:56 +0100 |
|---|---|---|
| committer | Christopher Li <sparse@chrisli.org> | 2017-02-16 20:43:04 +0800 |
| commit | a01240e7e357b19b1ab6511406d03058c71e0de4 (patch) | |
| tree | 8724284e78e02e140a1d0aaa434dc6accb0b4a0e /validation | |
| parent | 3d17b5930d6a102fc97e8eb195ac2cf2ef10afa9 (diff) | |
| download | sparse-dev-a01240e7e357b19b1ab6511406d03058c71e0de4.tar.gz | |
fix killing of OP_PHIs
OP_PHIs were killed by calling clear_phi() but this function
only replaces the phi node's sources by VOID without adjusting
the usage of these sources.
Fix this by instead calling kill_use() on each of the sources
via the newly created helper kill_use_list().
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-phi-node.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/validation/kill-phi-node.c b/validation/kill-phi-node.c index 88de9f96..cff62b64 100644 --- a/validation/kill-phi-node.c +++ b/validation/kill-phi-node.c @@ -9,6 +9,15 @@ void foo(int a, int *b, unsigned int g) d = 8; } +int bar(void); +int bar(void) +{ + int i; + for (i = 0; i; i--) + ; + return 0; +} + /* * check-name: kill-phi-node * check-command: test-linearize $file |
