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

ocamlopt generates wrong assembly file number with multiple files. #5603

vicuna opened this issue Apr 28, 2012 · 2 comments


None yet
1 participant
Copy link

commented Apr 28, 2012

Original bug ID: 5603
Reporter: jm
Status: closed (set by @xavierleroy on 2015-12-11T18:19:45Z)
Resolution: fixed
Priority: high
Severity: block
Fixed in version: 4.00.0+dev
Category: back end (clambda to assembly)
Related to: #5487

Bug description

% head -n +1 {t,tt}.ml
==> <==
print_endline "T"

==> <==
print_endline "Tt"

% /tmp/install/bin/ocamlopt -verbose -S -c -g /tmp/{t,tt}.ml

  • as -o '/tmp/t.o' '/tmp/t.s'
  • as -o '/tmp/tt.o' '/tmp/tt.s'
    /tmp/tt.s: Assembler messages:
    /tmp/tt.s:64: Error: unassigned file number 1
    File "/tmp/", line 1:
    Error: Assembler error, input left in file /tmp/tt.s

% grep .file /tmp/{t,tt}.s
/tmp/t.s: .file 1 "/tmp/"
/tmp/tt.s: .file 2 "/tmp/"

Looks like a counter used by #5487
should be reset to 1 between file processing.


This comment has been minimized.

Copy link

commented May 2, 2012

Comment author: @damiendoligez

I have confirmed that this bug was introduced between commits 12179 and 12181.


This comment has been minimized.

Copy link

commented May 12, 2012

Comment author: @xavierleroy

Fixed in 4.00 branch (r12448) and in trunk (r12449)

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