mirror of
https://github.com/golang/go
synced 2024-11-14 13:30:30 -07:00
88dc4aee7c
The wasm archtecture was missing a rule to handle OffPtr with a negative offset. This commit makes it so OffPtr always gets lowered to I64AddConst. Fixes #25741 Change-Id: I1d48e2954e3ff31deb8cba9a9bf0cab7c4bab71a Reviewed-on: https://go-review.googlesource.com/116595 Reviewed-by: Cherry Zhang <cherryyz@google.com> Run-TryBot: Cherry Zhang <cherryyz@google.com>
15 lines
234 B
Go
15 lines
234 B
Go
// compile
|
|
|
|
// Copyright 2018 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package main
|
|
|
|
var s []int
|
|
|
|
func main() {
|
|
i := -1
|
|
s[i] = 0
|
|
}
|