cmd/compile: type alias error when compiled with assembly file including go_asm.h #22877
Labels
FrozenDueToAge
NeedsFix
The path to resolution is known, but the work has not been done.
release-blocker
Milestone
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?Go 1.9.2
Does this issue reproduce with the latest release?
I don't know
What operating system and processor architecture are you using (
go env
)?linux amd64
What did you do?
I have two files,
main.go
andasm_amd64.s
and
What did you expect to see?
I use
go build -o main
, expect a success compiling.What did you see instead?
The log tells me that the
go_asm.h
is wrong, so I usego tool compile -o main.o -asmhdr go_asm.h main.go
, getgo_asm.h
as follows:Actually, this is a wrong file. So when I remove the statement
#include go_asm.h
inasm_amd64.s
, the compiling is successful. Because this error file doesn't been used.And I find this file is generated in
cmd/compile/internal/gc/export.go:370
The code at
cmd/compile/internal/gc/export.go:389
is the error.Because the Sym
t
has been change atcmd/compile/internal/gc/typecheck.go:3821
So the code at
cmd/compile/internal/gc/export.go:389
should be changed toWhen I changed this, the
go_asm.h
becomesThen the world becomes good.
The text was updated successfully, but these errors were encountered: