diff options
author | Michael Forney <mforney@mforney.org> | 2022-01-19 11:12:59 -0800 |
---|---|---|
committer | Michael Forney <mforney@mforney.org> | 2022-01-22 11:36:12 -0800 |
commit | 51e61fa5fa3de8cabc2191a5c6ac4d18aaaaf049 (patch) | |
tree | 8915d405a6f4aeadb28e06ace14d9459aa0b23b4 /test | |
parent | d47ebf4c75615d1667a587d53dcd654e12ca6829 (diff) |
Handle unary minus specially instead of 0 - x
This is necessary to fix unary negation of floating-point 0 (also
depends on a pending qbe patch).
Diffstat (limited to 'test')
-rw-r--r-- | test/const-expr-neg.c | 1 | ||||
-rw-r--r-- | test/const-expr-neg.qbe | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/test/const-expr-neg.c b/test/const-expr-neg.c new file mode 100644 index 0000000..0918aa9 --- /dev/null +++ b/test/const-expr-neg.c @@ -0,0 +1 @@ +double x = -0.0; diff --git a/test/const-expr-neg.qbe b/test/const-expr-neg.qbe new file mode 100644 index 0000000..b380795 --- /dev/null +++ b/test/const-expr-neg.qbe @@ -0,0 +1 @@ +export data $x = align 8 { d d_-0, } |