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

cmd/asm: unactionable "invalid local variable type 0" #12658

Open
dvyukov opened this issue Sep 17, 2015 · 3 comments
Open

cmd/asm: unactionable "invalid local variable type 0" #12658

dvyukov opened this issue Sep 17, 2015 · 3 comments
Labels
compiler/runtime Issues related to the Go compiler and/or runtime.
Milestone

Comments

@dvyukov
Copy link
Member

dvyukov commented Sep 17, 2015

cmd/asm produces the following error message on the program:

TEXT T(SB),$0
TYPE
asm: T: invalid local variable type 0

The error message should contain file name and line number, otherwise it is unactionable.

go version devel +5512ac2 Wed Sep 16 17:56:14 2015 +0000 linux/amd64

@robpike robpike assigned rsc and unassigned robpike Sep 17, 2015
@robpike
Copy link
Contributor

robpike commented Sep 17, 2015

The TYPE pseudo is not implemented by the assembler, nor was it implemented in the 1.4 assembler. The compiler emits it though. It needs to be brought into the assembler and parsed there. Or, more likely, not.

The error message here is not the real issue.

@dvyukov
Copy link
Member Author

dvyukov commented Sep 17, 2015

FWIW, I've got whole bunch of such messages without any location information:

    287 duplicate TEXT for C    
    198 C: invalid local variable type 0  
    176 T: invalid local variable type 0  
    126 duplicate TEXT for T    
    121 unknown TLS base register for linux  
     56 duplicate TEXT for _    
     24 "".: invalid local variable type 0  
     19 duplicate TEXT for "".    
     15 symbol T listed multiple times   
      3 duplicate TEXT for n    
      2 symbol O listed multiple times   

@robpike
Copy link
Contributor

robpike commented Sep 17, 2015

Those are all coming from the obj library, not the assembler itself. The obj library could profit by printing location information.

@rsc rsc added this to the Go1.6 milestone Oct 23, 2015
@rsc rsc modified the milestones: Unplanned, Go1.6 Dec 5, 2015
@rsc rsc removed their assignment Jun 23, 2022
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime.
Projects
None yet
Development

No branches or pull requests

4 participants