1
0
mirror of https://github.com/golang/go synced 2024-11-22 20:24:47 -07:00

test: add test that caused a gofrontend internal error

For #44383

Change-Id: I3610105dad3574e210e226d3ba80a4ba5a7eeaa6
Reviewed-on: https://go-review.googlesource.com/c/go/+/300789
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
This commit is contained in:
Ian Lance Taylor 2021-03-10 19:35:22 -08:00
parent 0fc370c5d2
commit 415ca3f1f0

View File

@ -0,0 +1,18 @@
// compile
// Copyright 2021 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.
// Issue 44383: gofrontend internal compiler error
package main
func main() {
var b1, b2 byte
f := func() int {
var m map[byte]int
return m[b1/b2]
}
f()
}