diff options
author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2017-03-22 15:38:49 +0100 |
---|---|---|
committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2017-03-22 18:24:41 +0100 |
commit | b5867a33b62c04811784c6fc233c601a4f2b0841 (patch) | |
tree | 3aac0baf1179d23128b5b94aff5538a2fe7046b6 /evaluate.c | |
parent | 4480ef07d1187395ea8b277174ac2545254b40f0 (diff) | |
download | sparse-b5867a33b62c04811784c6fc233c601a4f2b0841.tar.gz |
fix evaluation of a function or array symbol in conditionals
Functions and arrays degenerate as pointers in most context
but this wasn't done in the case of conditionals.
As a result the value of the conditional after linearization
was invalid.
Fix this by calling degenerate() in evaluate_conditional().
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'evaluate.c')
-rw-r--r-- | evaluate.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -881,6 +881,7 @@ static struct symbol *evaluate_conditional(struct expression *expr, int iterator ctype = NULL; } } + ctype = degenerate(expr); return ctype; } |