Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation failure related to unboxing Int64 on 32-bit machines #6940

Closed
vicuna opened this issue Jul 28, 2015 · 4 comments

Comments

@vicuna
Copy link

commented Jul 28, 2015

Original bug ID: 6940
Reporter: @alainfrisch
Status: closed (set by @xavierleroy on 2017-02-16T14:16:31Z)
Resolution: fixed
Priority: normal
Severity: minor
Target version: 4.03.0+dev / +beta1
Fixed in version: 4.03.0+dev / +beta1
Category: back end (clambda to assembly)

Bug description

With current trunk, compiling with "ocamlopt -g" the code:

let _ =
  let r = ref 0L in
  !r

results in:

Fatal error: exception File "asmcomp/cmmgen.ml", line 2096, characters 6-12: Assertion failed

This corresponds to:

and transl_unbox_int bi = function
    Uconst(Uconst_ref(_, Uconst_int32 n)) ->
      Cconst_natint (Nativeint.of_int32 n)
  | Uconst(Uconst_ref(_, Uconst_nativeint n)) ->
      Cconst_natint n
  | Uconst(Uconst_ref(_, Uconst_int64 n)) ->
      assert (size_int = 8); Cconst_natint (Int64.to_nativeint n)
  | Uprim(Pbintofint bi',[Uconst(Uconst_int i)],_) when bi = bi' ->
      Cconst_int i
  | exp -> unbox_int bi (transl exp)

File attachments

@vicuna

This comment has been minimized.

Copy link
Author

commented Jul 28, 2015

Comment author: @alainfrisch

This is related to the new unboxing strategy : #109

I'll commit the attached patch.

@vicuna

This comment has been minimized.

Copy link
Author

commented Jul 28, 2015

Comment author: @alainfrisch

Waiting for confirmation from vbrankov before closing this ticket.

@vicuna

This comment has been minimized.

Copy link
Author

commented Nov 27, 2015

Comment author: @damiendoligez

ping?

@vicuna

This comment has been minimized.

Copy link
Author

commented Nov 28, 2015

Comment author: @xavierleroy

Works fine with the current trunk.

@vicuna vicuna closed this Feb 16, 2017

@vicuna vicuna added the back-end label Mar 14, 2019

@vicuna vicuna added this to the 4.03.0 milestone Mar 14, 2019

@vicuna vicuna added the bug label Mar 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.