Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007201OCamlmiddle end (typedtree to clambda)public2016-03-31 11:582017-03-03 18:03
Reporterfilliatr 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionduplicate 
PlatformOSOS Version
Product Version4.02.3 
Target Version4.03.1+devFixed in Version 
Summary0007201: Wrong optimization of 0 / e
DescriptionIn file asmcomp/cmmgen.ml, in function div_int, the optimization

  | (Cconst_int 0 as c1, c2) ->
      Csequence(c2, c1)

is wrong, since c2 could be zero, as in

  0 / Random.int 1

or

  0 / List.hd [0]


Steps To Reproduce(* compile this code with ocamlopt and run it *)
let = 0 / Random.int 1
(* it does not raise Division_by_zero *)
Additional Informationdoes not show up in ocamlc
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0016892)
shinwell (developer)
2016-12-08 15:37

Superceded by https://github.com/ocaml/ocaml/pull/954 [^]

- Issue History
Date Modified Username Field Change
2016-03-31 11:58 filliatr New Issue
2016-04-05 16:14 doligez Severity major => minor
2016-04-05 16:14 doligez Status new => confirmed
2016-04-05 16:14 doligez Target Version => 4.03.1+dev
2016-12-08 15:37 shinwell Note Added: 0016892
2016-12-08 15:37 shinwell Status confirmed => closed
2016-12-08 15:37 shinwell Resolution open => duplicate
2017-02-23 16:42 doligez Category Ocaml optimization => -Ocaml optimization
2017-03-03 18:03 doligez Category -Ocaml optimization => middle end (typedtree to clambda)


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker