aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2020-10-05 22:14:04 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2020-10-08 13:44:48 +0200
commitb6a937a18d3bb80bce3b96dcdd7753032132852e (patch)
treed738db36c79f1a585bd595a936a2e826a552a51c /validation
parent24bdaac6682c36f5f7878321e8f9eb02c0993572 (diff)
downloadsparse-dev-b6a937a18d3bb80bce3b96dcdd7753032132852e.tar.gz
fix evaluation of pointer to bool conversions
The pointer to bool conversion used an indirect intermediate conversion to an int because the pointer was compared to 0 and not to a null pointer. The final result is the same but the intermediate conversion generated an unneeded OP_PTRTOU instruction which made some tests to fail. Fix this by directly comparing to a null pointer of the same type as the type to convert. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation')
-rw-r--r--validation/linear/bool-cast-lp32.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/validation/linear/bool-cast-lp32.c b/validation/linear/bool-cast-lp32.c
index 44a650f4..7aab31dd 100644
--- a/validation/linear/bool-cast-lp32.c
+++ b/validation/linear/bool-cast-lp32.c
@@ -12,7 +12,6 @@ static _Bool ffun_e(void) { return (_Bool)ffun; }
/*
* check-name: bool-cast-pointer
* check-command: test-linearize -m32 -fdump-ir $file
- * check-known-to-fail
*
* check-output-ignore
* check-output-excludes: ptrtu\\.