diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2017-12-04 12:52:04 +0100 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2017-12-08 11:29:14 +0100 |
| commit | fc13b6e14e6549486b61429099af5ad78e918366 (patch) | |
| tree | 1235d7fd0aad62c902909feb01528297dbbf1262 /validation/preprocessor | |
| parent | 1a17b93361a9c96bccc726b816832432d374967e (diff) | |
| download | sparse-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/preprocessor')
0 files changed, 0 insertions, 0 deletions
