cmd/vet: asmdecl doesn't recognize #ifdefs in asm file #45318
Labels
Analysis
Issues related to static analysis (vet, x/tools/go/analysis)
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Tried to build and test https://go-review.googlesource.com/c/go/+/306369. The build fails on ppc64 with a vet error because there is a function declaration in sys_linux_ppc64x.s inside an #ifdef GOARCH_ppc64le but vet's asmdecl considers it as existing on ppc64. It fails because the Go declaration for the function is built on ppc64le but not ppc64. This is displayed in the first Trybot failure on this CL; I tried to workaround the problem but got a different error the second time.
What did you expect to see?
Correct build and test.
What did you see instead?
runtime
./sys_linux_ppc64x.s:340:1: [ppc64] callCgoSigaction: function callCgoSigaction missing Go declaration
The text was updated successfully, but these errors were encountered: