Commit f68d1df6 authored by Russ Cox's avatar Russ Cox

cmd/compile: fix interaction between GOEXPERIMENT=fieldtrack and race detector

Tested by hand.
Only lines of code changing are protected by Fieldtrack_enabled > 0,
which is never true in standard Go distributions.

Fixes #12171.

Change-Id: I963b9997dac10829db8ad4bfc97a7d6bf14b55c6
Reviewed-on: https://go-review.googlesource.com/13676Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
parent 9e26cde7
......@@ -2532,7 +2532,7 @@ func lookdot(n *Node, t *Type, dostrcmp int) *Type {
n.Xoffset = f1.Width
n.Type = f1.Type
if obj.Fieldtrack_enabled > 0 {
dotField[typeSym{t, s}] = f1
dotField[typeSym{t.Orig, s}] = f1
}
if t.Etype == TINTER {
if Isptr[n.Left.Type.Etype] {
......
......@@ -3873,7 +3873,7 @@ func usefield(n *Node) {
if Isptr[t.Etype] {
t = t.Type
}
field := dotField[typeSym{t, n.Right.Sym}]
field := dotField[typeSym{t.Orig, n.Right.Sym}]
if field == nil {
Fatal("usefield %v %v without paramfld", n.Left.Type, n.Right.Sym)
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment