-
Notifications
You must be signed in to change notification settings - Fork 474
Closed
Labels
Description
The program
print_int (let c = (/) 0 0 in 0)
succeeds under BuckleScript 1.8.0 (Using OCaml4.02.3+BS )
but throws a Division_by_zero exception (as expected) using the OCaml bytecode backend.
On a related note:
print_int (let h = ((mod) 0 0) in 0)
exhibits the same difference in behaviour.
Note: there have been similar recent issues with optimizations of division in the OCaml native code backend: https://caml.inria.fr/mantis/view.php?id=7201
As a casual user I don't know how much BuckleScript shares with OCaml's middle/backend, and hence whether these could be inherited bugs.