diff options
author | Russ Cox <rsc@golang.org> | 2014-05-27 23:58:49 -0400 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2014-05-27 23:58:49 -0400 |
commit | 7ace5f6bd3919cb0678e17e7a634d2197a5dc539 (patch) | |
tree | 03ed72b227eb7e76fee6de64da46b281d11df442 /test/fixedbugs | |
parent | 7522fb328229f1e61590ed11ae205b32c0b8be98 (diff) | |
download | go-7ace5f6bd3919cb0678e17e7a634d2197a5dc539.tar.gz |
cmd/gc: fix infinite loop in nil check removal
Fixes issue 8076.
LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://codereview.appspot.com/93610043
Diffstat (limited to 'test/fixedbugs')
-rw-r--r-- | test/fixedbugs/issue8076.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/fixedbugs/issue8076.go b/test/fixedbugs/issue8076.go new file mode 100644 index 000000000..ad8906775 --- /dev/null +++ b/test/fixedbugs/issue8076.go @@ -0,0 +1,17 @@ +// compile + +// Copyright 2014 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 8076. nilwalkfwd walked forward forever +// on the instruction loop following the dereference. + +package main + +func main() { + _ = *(*int)(nil) +L: + _ = 0 + goto L +} |