diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2021-03-28 16:07:29 +0100 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2021-03-28 16:07:29 +0200 |
| commit | dcb199646134ae0d264c72175a9ad8314f7836c8 (patch) | |
| tree | c87febf1aa5ec612713bf0c2ec8b280c7a13bfc6 /validation | |
| parent | b204ead75fc624928e783da8b6658f3a8a06871c (diff) | |
| download | sparse-dev-dcb199646134ae0d264c72175a9ad8314f7836c8.tar.gz | |
correctly count phi arguments
In a phi-node,pseudo_list_size() can't be used for counting its arguments
because VOIDs must be ignored.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation')
| -rw-r--r-- | validation/optim/phi-count00.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/validation/optim/phi-count00.c b/validation/optim/phi-count00.c new file mode 100644 index 00000000..38db0eda --- /dev/null +++ b/validation/optim/phi-count00.c @@ -0,0 +1,27 @@ +inline int inl(int d, int e, int f) +{ + switch (d) { + case 0: + return e; + case 1: + return f; + default: + return 0; + } +} + +void foo(int a, int b, int c) +{ + while (1) { + if (inl(a, b, c)) + break; + } +} + +/* + * check-name: phi-count00 + * check-command: test-linearize -Wno-decl $file + * + * check-output-ignore + * check-output-pattern(0,2): phisrc + */ |
