]> Cypherpunks repositories - gostls13.git/commitdiff
test: add testcase for Issue 34520
authorAlberto Donizetti <alb.donizetti@gmail.com>
Fri, 4 Oct 2019 11:52:56 +0000 (13:52 +0200)
committerAlberto Donizetti <alb.donizetti@gmail.com>
Fri, 4 Oct 2019 15:04:57 +0000 (15:04 +0000)
CL 188317 introduced a compiler crash during dwarf generation which
was reported as Issue #34520. After CL 188217, the issue appears to be
fixed. Add a testcase to avoid future regressions.

Fixes #34520

Change-Id: I73544a9e9baf8dbfb85c19eb6d202beea05affb6
Reviewed-on: https://go-review.googlesource.com/c/go/+/198546
Run-TryBot: Alberto Donizetti <alb.donizetti@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
test/fixedbugs/issue34520.go [new file with mode: 0644]

diff --git a/test/fixedbugs/issue34520.go b/test/fixedbugs/issue34520.go
new file mode 100644 (file)
index 0000000..d92d4cc
--- /dev/null
@@ -0,0 +1,12 @@
+// compile
+
+// Copyright 2019 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 p
+
+func f() {
+       for true {
+       }
+}