diff options
| author | Ian Lance Taylor <iant@golang.org> | 2021-03-10 19:35:22 -0800 |
|---|---|---|
| committer | Ian Lance Taylor <iant@golang.org> | 2021-03-11 17:20:58 +0000 |
| commit | 415ca3f1f0fa05a98561752e0787f59b77f19645 (patch) | |
| tree | a4cbea5cd039e5555bb3e25fed4f578447a3d3d2 | |
| parent | 0fc370c5d26353a865a29a01f093942c949d530a (diff) | |
| download | go-415ca3f1f0fa05a98561752e0787f59b77f19645.tar.xz | |
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>
| -rw-r--r-- | test/fixedbugs/issue44383.go | 18 |
1 files changed, 18 insertions, 0 deletions
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() +} |
