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

Erroneous assembly when using recursive modules on Windows/MSVC #5391

Closed
vicuna opened this issue Oct 28, 2011 · 2 comments
Closed

Erroneous assembly when using recursive modules on Windows/MSVC #5391

vicuna opened this issue Oct 28, 2011 · 2 comments
Assignees

Comments

@vicuna
Copy link

vicuna commented Oct 28, 2011

Original bug ID: 5391
Reporter: ripoche
Assigned to: @xavierleroy
Status: closed (set by @xavierleroy on 2013-08-31T10:43:58Z)
Resolution: duplicate
Priority: normal
Severity: major
Version: 3.11.2
Fixed in version: 3.12.1
Category: ~DO NOT USE (was: OCaml general)
Related to: #4778
Monitored by: laurent-carrie

Bug description

OCaml 3.11.2 on Windows (MSVC7.1 and MSVC8)

The following snippet generates illegal assembly.

module rec A : sig
type t = B.t
end = struct
type t = B.t
end and B : sig
type t = int
end = struct
type t = int
end

Additional information

D:>ocamlopt -verbose -c rec_modules.ml

  • ml /nologo /coff /Cp /c /Fo"rec_modules.obj" "d:\work\tmp\camlasm809b80.asm"
    Assembling: d:\work\tmp\camlasm809b80.asm
    d:\work\tmp\camlasm809b80.asm(32) : error A2008: syntax error : L100014
    d:\work\tmp\camlasm809b80.asm(40) : error A2008: syntax error : L100013
    d:\work\tmp\camlasm809b80.asm(58) : error A2008: syntax error : L100011
    d:\work\tmp\camlasm809b80.asm(73) : error A2008: syntax error : L100009
    d:\work\tmp\camlasm809b80.asm(76) : error A2108: use of register assumed to ERROR
    d:\work\tmp\camlasm809b80.asm(78) : error A2108: use of register assumed to ERROR
    d:\work\tmp\camlasm809b80.asm(83) : error A2108: use of register assumed to ERROR
    d:\work\tmp\camlasm809b80.asm(89) : error A2108: use of register assumed to ERROR
    d:\work\tmp\camlasm809b80.asm(95) : error A2108: use of register assumed to ERROR
    d:\work\tmp\camlasm809b80.asm(100) : error A2108: use of register assumed to ERROR
    d:\work\tmp\camlasm809b80.asm(82) : error A2107: cannot have implicit far jump or call to near label
    d:\work\tmp\camlasm809b80.asm(88) : error A2107: cannot have implicit far jump or call to near label
    d:\work\tmp\camlasm809b80.asm(94) : error A2107: cannot have implicit far jump or call to near label
    d:\work\tmp\camlasm809b80.asm(99) : error A2107: cannot have implicit far jump or call to near label
    d:\work\tmp\camlasm809b80.asm(30) : error A2006: undefined symbol : L100014
    d:\work\tmp\camlasm809b80.asm(38) : error A2006: undefined symbol : L100013
    d:\work\tmp\camlasm809b80.asm(56) : error A2006: undefined symbol : L100011
    d:\work\tmp\camlasm809b80.asm(71) : error A2006: undefined symbol : L100009
    File "rec_modules.ml", line 1, characters 0-1:
    Error: Assembler error, input left in file d:\work\tmp\camlasm809b80.asm

File attachments

@vicuna
Copy link
Author

vicuna commented Nov 2, 2011

Comment author: ripoche

The same snippet compiles fine with OCaml 3.12.1 Win32/MSVC8.

@vicuna
Copy link
Author

vicuna commented Nov 21, 2011

Comment author: @xavierleroy

Thanks for the update. Apparently this was the same problem as in #4778, and the same fix applies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants