Skip to content

Commit c313591

Browse files
committed
Revert "cmd/compile: allow StructSelect [x] of interface data fields for x>0"
This reverts commit bcd25c7 (CL 693415) Reason for revert: still causing compiler failures on Google test code Change-Id: I887edcff56bde3ffa316f2b629021ad323a357fa Reviewed-on: https://go-review.googlesource.com/c/go/+/694996 Reviewed-by: Keith Randall <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]>
1 parent 7248995 commit c313591

File tree

3 files changed

+8
-25
lines changed

3 files changed

+8
-25
lines changed

src/cmd/compile/internal/ssa/_gen/dec.rules

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
// Some of these are copied from generic.rules
9999

100100
(IMake _typ (StructMake val)) => (IMake _typ val)
101-
(StructSelect (IData x)) => (IData x)
101+
(StructSelect [0] (IData x)) => (IData x)
102102

103103
(StructSelect [i] x:(StructMake ___)) => x.Args[i]
104104

@@ -109,7 +109,7 @@
109109
// More annoying case: (ArraySelect[0] (StructSelect[0] isAPtr))
110110
// There, result of the StructSelect is an Array (not a pointer) and
111111
// the pre-rewrite input to the ArraySelect is a struct, not a pointer.
112-
(StructSelect x) && x.Type.IsPtrShaped() => x
112+
(StructSelect [0] x) && x.Type.IsPtrShaped() => x
113113
(ArraySelect [0] x) && x.Type.IsPtrShaped() => x
114114

115115
// These, too. Bits is bits.

src/cmd/compile/internal/ssa/rewritedec.go

Lines changed: 6 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/fixedbugs/issue74888.go

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)