diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-06-18 14:28:50 +0200 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-06-21 14:07:33 +0200 |
| commit | 42b6bbfcfca288f5268c0ba46e4f9e98c060b9cc (patch) | |
| tree | 4b85a2000546ba13ce90d9e02a2b186a5cf708a6 /validation/optim | |
| parent | d99e1c4b72b2fda1bae2db1ba72385d9f380c160 (diff) | |
| download | sparse-dev-42b6bbfcfca288f5268c0ba46e4f9e98c060b9cc.tar.gz | |
add testcase for bad fpcast simplification
A integer-to-float cast of a constant is currently simplified away
as if it is an integer-to-integer cast. That's bad.
Create a testcase for it.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation/optim')
| -rw-r--r-- | validation/optim/fpcast-constant.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/validation/optim/fpcast-constant.c b/validation/optim/fpcast-constant.c new file mode 100644 index 00000000..47feffe5 --- /dev/null +++ b/validation/optim/fpcast-constant.c @@ -0,0 +1,14 @@ +static double foo(double a, int p) +{ + return a * ((p & 0) + 2); +} + +/* + * check-name: fpcast-constant + * check-command: test-linearize $file + * check-known-to-fail + * + * check-output-ignore + * check-output-contains: fpcast\\. + * check-output-excludes: fmul\\..*\\$2 + */ |
