From c1e46af62f2893a6beb2341ef71ffe8d3787975b Mon Sep 17 00:00:00 2001 From: Alberto Donizetti Date: Fri, 4 Oct 2019 13:52:56 +0200 Subject: [PATCH] test: add testcase for Issue 34520 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 TryBot-Result: Gobot Gobot Reviewed-by: David Chase --- test/fixedbugs/issue34520.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 test/fixedbugs/issue34520.go diff --git a/test/fixedbugs/issue34520.go b/test/fixedbugs/issue34520.go new file mode 100644 index 0000000000..d92d4ccbc5 --- /dev/null +++ b/test/fixedbugs/issue34520.go @@ -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 { + } +}