From: Ian Lance Taylor Date: Thu, 11 Mar 2021 03:35:22 +0000 (-0800) Subject: test: add test that caused a gofrontend internal error X-Git-Tag: go1.17beta1~1182 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=415ca3f1f0fa05a98561752e0787f59b77f19645;p=gostls13.git 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 Run-TryBot: Ian Lance Taylor TryBot-Result: Go Bot Reviewed-by: Brad Fitzpatrick Reviewed-by: Than McIntosh Reviewed-by: Cherry Zhang --- diff --git a/test/fixedbugs/issue44383.go b/test/fixedbugs/issue44383.go new file mode 100644 index 0000000000..d2d57524d1 --- /dev/null +++ b/test/fixedbugs/issue44383.go @@ -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() +}