1
0
mirror of https://github.com/golang/go synced 2024-11-26 17:56:55 -07:00

[dev.unified] cmd/compile: restore Unified IR linkname pragma diagnostic

CL 333109 restore the diagnostic for irgen, now it's safe to restore for
Unified IR, too.

Updates #53058

Change-Id: I467902c0e9fa451aaa78cf0813231f14d9d7a3a0
Reviewed-on: https://go-review.googlesource.com/c/go/+/410346
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
This commit is contained in:
Cuong Manh Le 2022-05-27 19:06:30 +07:00
parent 9e5c968021
commit e7ef58542c
2 changed files with 4 additions and 8 deletions

View File

@ -1661,10 +1661,7 @@ func (pw *pkgWriter) collectDecls(noders []*noder) {
}
default:
// TODO(mdempsky): Enable after #42938 is fixed.
if false {
pw.errorf(l.pos, "//go:linkname must refer to declared function or variable")
}
pw.errorf(l.pos, "//go:linkname must refer to declared function or variable")
}
}
}

View File

@ -1993,10 +1993,9 @@ var _ = setOf(
)
var unifiedFailures = setOf(
"closure3.go", // unified IR numbers closures differently than -d=inlfuncswithclosures
"escape4.go", // unified IR can inline f5 and f6; test doesn't expect this
"inline.go", // unified IR reports function literal diagnostics on different lines than -d=inlfuncswithclosures
"linkname3.go", // unified IR is missing some linkname errors
"closure3.go", // unified IR numbers closures differently than -d=inlfuncswithclosures
"escape4.go", // unified IR can inline f5 and f6; test doesn't expect this
"inline.go", // unified IR reports function literal diagnostics on different lines than -d=inlfuncswithclosures
"fixedbugs/issue7921.go", // prints "… escapes to heap", but test expects "string(…) escapes to heap"
"typeparam/issue47631.go", // unified IR can handle local type declarations