Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007675OCamlmiddle end (typedtree to clambda)public2017-11-21 16:042017-11-21 17:10
Reporterdoligez 
Assigned To 
PriorityurgentSeverityblockReproducibilityalways
StatusresolvedResolutionno change required 
PlatformOSOS Version
Product Version4.06.0 
Target Version4.06.1+devFixed in Version 
Summary0007675: pattern-matching gives inconsistent results
DescriptionIn the example program below, the assertion should never fail but it does fail in 4.06.0 (and not in 4.05.0).

If you remove the partial application (definition of f) and do total applications, the problem disappears.
Steps To Reproducecompile and run this program:
----------------------------------
let add_bit ({contents} as t) _ =
  assert (contents = t.contents);
  t.contents <- 1

let f = add_bit (ref 0)

;; f false
;; f false
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0018676)
gasche (developer)
2017-11-21 16:25

I think that the new behavior is correct.
(0018677)
lpw25 (developer)
2017-11-21 16:32

I agree. This is an intentional consequence of this bug fix:

  https://github.com/ocaml/ocaml/pull/1308 [^]
(0018678)
xleroy (administrator)
2017-11-21 17:06

Marking as "resolved / no change required". Holler if you disagree.
(0018679)
doligez (administrator)
2017-11-21 17:08

Leaves me wondering how many programs are sneakily broken by this fix.
(0018680)
gasche (developer)
2017-11-21 17:10

Well that's the problem with having long-standing nasty bugs...

- Issue History
Date Modified Username Field Change
2017-11-21 16:04 doligez New Issue
2017-11-21 16:05 doligez Description Updated View Revisions
2017-11-21 16:25 gasche Note Added: 0018676
2017-11-21 16:32 lpw25 Note Added: 0018677
2017-11-21 17:06 xleroy Note Added: 0018678
2017-11-21 17:06 xleroy Status new => resolved
2017-11-21 17:06 xleroy Resolution open => no change required
2017-11-21 17:08 doligez Note Added: 0018679
2017-11-21 17:10 gasche Note Added: 0018680


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker