diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2017-03-11 14:48:44 +0100 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2017-03-27 16:12:27 +0200 |
| commit | e6f52d5bb67d6941b985a45b08bf87c305e3ba5b (patch) | |
| tree | 896dbc0df199cbe13c9bc49b2cbb2fcd06334939 /validation | |
| parent | c1a53a868ebafd1d134e4a77c86074b9d07e4281 (diff) | |
| download | sparse-dev-e6f52d5bb67d6941b985a45b08bf87c305e3ba5b.tar.gz | |
fix cast to pointer to floating-point
By mistake, a cast to floating-pointer pointer was
created as OP_FPCAST instead of OP_PTRCAST.
Fix this by adding the missing 'else'.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation')
| -rw-r--r-- | validation/fp-vs-ptrcast.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/validation/fp-vs-ptrcast.c b/validation/fp-vs-ptrcast.c new file mode 100644 index 00000000..817aee5c --- /dev/null +++ b/validation/fp-vs-ptrcast.c @@ -0,0 +1,13 @@ +float *f01(void* p) +{ + return p; +} + +/* + * check-name: fp-vs-ptrcast + * check-command: test-linearize -Wno-decl $file + * check-output-ignore + * + * check-output-excludes: fpcast + * check-output-contains: ptrcast + */ |
