Files
golang.go/test/fixedbugs/issue78028.go
Cuong Manh Le 28b1d8886b cmd/compile: fix ICE when checking slice cap
CL 226737 optimized len check when make slice in common case when len is
within range of cap. However, the generated code does not walk the AST
for the if condition, causing un-walked nodes passed to the backend.

Fixes #78028

Change-Id: I492fb230c10e585dc09391728ef4df2c0058ce12
Reviewed-on: https://go-review.googlesource.com/c/go/+/753100
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Jakub Ciolek <jakub@ciolek.dev>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Keith Randall <khr@google.com>
2026-03-10 04:42:57 -07:00

14 lines
256 B
Go

// compile
// Copyright 2026 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 z = map[int]int{0: 1}
func main() {
_ = make([]byte, z[0], 1)
}