Fixes codegen bug with literal negative zero, fixes #7079 (#7158)

* Fixes #7079

* Fix handling of neg zero during constant folding
This commit is contained in:
GULPF 2018-01-31 16:29:42 +01:00 • committed by Andreas Rumpf
commit 94038545be
4 changed files with 31 additions and 11 deletions

9
tests/ccgbugs/t7079.nim Normal file
View file

@ -0,0 +1,9 @@
discard """
action: run
targets: '''c js'''
"""
import math
let x = -0.0
doAssert classify(x) == fcNegZero
doAssert classify(1 / -0.0) == fcNegInf