You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
nim cpp -d:release -o:bin/nim_cpp compiler/nim.nim
bin/nim_cpp cpp -r main.nim
CT
nan
nan
nan
true
nan
true
nan
RT
0.0
nan
nan
true
nan
false
nan
import math
procmain()=let a =Nanlet b =$a
echo b # 0.0 BUGecho$Nan# nanlet a2 =$Nanecho a2 # nanecho0.0/0.0==0.0# true BUGecho0.0/0.0# nanlet a3 =0.0echo a3/0.0==0.0# falseecho a3/0.0# nanstatic: echo"CT"static: main()
echo"RT"main()
this explains oddly failing CI tests in cpp mode
FAIL: tests/float/tfloatmod.nim C++
Test "tests/float/tfloatmod.nim" in category "float"
Failure: reExitcodesDiffer
Expected:
exitcode: 0
Gotten:
exitcode: 1
Output:
tfloatmod.nim(129) tfloatmod
tfloatmod.nim(126) main
tfloatmod.nim(106) testSpecialCases
system.nim(3978) failedAssertImpl
system.nim(3971) raiseAssert
system.nim(3011) sysFatal
Error: unhandled exception: /Users/travis/build/nim-lang/Nim/tests/float/tfloatmod.nim(106, 13) `(r == expected) or (r.isnan and expected.isnan)` -inf mod -inf == nan but expected 0.0 [AssertionError]
marking as high priority as it affects running cpp mode in CI normally (right now it's being run as allowed failure, which means if new regressions happen with cpp mode, we won't know): indeed it seems like root cause for 3 failures in cpp mode out of ~6:
tests/float/tfloatnan.nim
lib/pure/math.nim
tests/float/tfloatmod.nim
EDIT:
looks like the bug is during const folding and compile time
The text was updated successfully, but these errors were encountered:
this explains oddly failing CI tests in cpp mode
marking as high priority as it affects running cpp mode in CI normally (right now it's being run as allowed failure, which means if new regressions happen with cpp mode, we won't know): indeed it seems like root cause for 3 failures in cpp mode out of ~6:
EDIT:
The text was updated successfully, but these errors were encountered: