aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2017-12-04 12:52:04 +0100
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2017-12-08 11:29:14 +0100
commitfc13b6e14e6549486b61429099af5ad78e918366 (patch)
tree1235d7fd0aad62c902909feb01528297dbbf1262 /validation
parent1a17b93361a9c96bccc726b816832432d374967e (diff)
downloadsparse-dev-fc13b6e14e6549486b61429099af5ad78e918366.tar.gz
fix: add missing degenerate() for logical not
Expressions involving the logical-not '!' does not call degenerate(). Since the result type is always 'int' and thus independent of the expression being negated, this has no effect on the type-checking but the linearization is wrong. For example, code like: int foo(void) { if (!arr) return 1; return 0; } generates: foo: load %r6 <- 0[arr] seteq.32 %r7 <- VOID, $0 ret.32 %r7 The 'load' being obviously wrong. Fix this by adding the missing degenerate(). Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation')
-rw-r--r--validation/linear/degen-log-not.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/validation/linear/degen-log-not.c b/validation/linear/degen-log-not.c
index baa7d536..a982e34b 100644
--- a/validation/linear/degen-log-not.c
+++ b/validation/linear/degen-log-not.c
@@ -33,7 +33,6 @@ int test_fun_degen(int i)
/*
* check-name: degenerate logical-not
* check-command: test-linearize -Wno-decl $file
- * check-known-to-fail
*
* check-output-ignore
* check-output-excludes: load