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

Closed
vicuna opened this issue Apr 28, 2012 · 2 comments
Closed

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

vicuna opened this issue Apr 28, 2012 · 2 comments

Comments

@vicuna
Copy link

@vicuna vicuna 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
==> t.ml <==
print_endline "T"

==> tt.ml <==
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/tt.ml", line 1:
    Error: Assembler error, input left in file /tmp/tt.s

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

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

@vicuna
Copy link
Author

@vicuna vicuna commented May 2, 2012

Comment author: @damiendoligez

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

@vicuna
Copy link
Author

@vicuna vicuna 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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant