summaryrefslogtreecommitdiff
path: root/test/fixedbugs
diff options
context:
space:
mode:
authorR?my Oudompheng <oudomphe@phare.normalesup.org>2014-03-04 08:18:17 +0100
committerR?my Oudompheng <oudomphe@phare.normalesup.org>2014-03-04 08:18:17 +0100
commit4a0fc76b208d7be9b70e44647a3b4c6b2f21620d (patch)
tree08b77c3543ab50b7c13b957f6ddffdae0fb004e6 /test/fixedbugs
parent7206697ce94ec88f8d1a8276f4e741ef1d10ccf2 (diff)
downloadgo-4a0fc76b208d7be9b70e44647a3b4c6b2f21620d.tar.gz
cmd/gc: use a register to checknil constants.
Fixes issue 7346. LGTM=rsc R=rsc, iant, khr CC=golang-codereviews https://codereview.appspot.com/69050044
Diffstat (limited to 'test/fixedbugs')
-rw-r--r--test/fixedbugs/issue7346.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/fixedbugs/issue7346.go b/test/fixedbugs/issue7346.go
new file mode 100644
index 000000000..dd5ea222f
--- /dev/null
+++ b/test/fixedbugs/issue7346.go
@@ -0,0 +1,14 @@
+// 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 7346 : internal error "doasm" error due to checknil
+// of a nil literal.
+
+package main
+
+func main() {
+ _ = *(*int)(nil)
+}