]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.unified] cmd/compile: restore Unified IR linkname pragma diagnostic
authorCuong Manh Le <cuong.manhle.vn@gmail.com>
Fri, 27 May 2022 12:06:30 +0000 (19:06 +0700)
committerCuong Manh Le <cuong.manhle.vn@gmail.com>
Wed, 8 Jun 2022 02:41:56 +0000 (02:41 +0000)
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>
src/cmd/compile/internal/noder/writer.go
test/run.go

index c3955c2cb642423aa51f6b208880a0bd65602925..2b22046de1f024f9cd574dcf25558eb252524e1a 100644 (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")
                        }
                }
        }
index 8ef11020da963e1d6e8d2aa4b5bd0ddcc674ebf6..a4ec19c73c0d54582d9694525ba72f0fd36787e3 100644 (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