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
Original bug ID: 6442 Reporter:@yakobowski Status: closed (set by @xavierleroy on 2017-02-16T14:16:48Z) Resolution: fixed Priority: normal Severity: major Target version: 4.02.0+dev Fixed in version: 4.02.0+dev Category: back end (clambda to assembly) Related to:#7042
Bug description
In the attached code, l should be equal to -0. This code compiled with ocamlopt from the trunk results in 0. (ocamlc exhibits no problem.) Option -no-float-const-prop has no effect.
The culprit seems to be an unfortunate interaction between Alain's work on sharing constants, and Xavier's work on floating-point constant propagation. The ~shared argument to Compilenv.new_structured_constant is probably responsible for sharing 0. and -0., since Pervasives.compare does not distinguish them. Implementing a proper comparison function in Compilenv.CstMap may be the solution.
I'm not OCaml-compiler savvy enough to fix the comparison function, but I can confirm that disabling the sharing of float constants in closure.ml fixes our issue.
Original bug ID: 6442
Reporter: @yakobowski
Status: closed (set by @xavierleroy on 2017-02-16T14:16:48Z)
Resolution: fixed
Priority: normal
Severity: major
Target version: 4.02.0+dev
Fixed in version: 4.02.0+dev
Category: back end (clambda to assembly)
Related to: #7042
Bug description
In the attached code, l should be equal to -0. This code compiled with ocamlopt from the trunk results in 0. (ocamlc exhibits no problem.) Option -no-float-const-prop has no effect.
File attachments
The text was updated successfully, but these errors were encountered: