summaryrefslogtreecommitdiff
path: root/test/fixedbugs
diff options
context:
space:
mode:
authorR?my Oudompheng <oudomphe@phare.normalesup.org>2014-09-15 18:24:16 +0200
committerR?my Oudompheng <oudomphe@phare.normalesup.org>2014-09-15 18:24:16 +0200
commitcc2fa2c32eaa33fe704dbb4145ee545ba6135b71 (patch)
tree252cc2e3bb887b91625724c25790d16e68144b65 /test/fixedbugs
parent567d00d491fd6ba602b1a68ee3232eb60a30bfd2 (diff)
downloadgo-cc2fa2c32eaa33fe704dbb4145ee545ba6135b71.tar.gz
cmd/gc: generate type alg after calling dowidth.
Previously it might happen before calling dowidth and result in a compiler crash. Fixes issue 8060. LGTM=dvyukov, rsc R=golang-codereviews, dvyukov, gobot, rsc CC=golang-codereviews https://codereview.appspot.com/110980044
Diffstat (limited to 'test/fixedbugs')
-rw-r--r--test/fixedbugs/issue8060.dir/a.go7
-rw-r--r--test/fixedbugs/issue8060.dir/b.go13
-rw-r--r--test/fixedbugs/issue8060.go9
3 files changed, 29 insertions, 0 deletions
diff --git a/test/fixedbugs/issue8060.dir/a.go b/test/fixedbugs/issue8060.dir/a.go
new file mode 100644
index 000000000..22ba69ee1
--- /dev/null
+++ b/test/fixedbugs/issue8060.dir/a.go
@@ -0,0 +1,7 @@
+// 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.
+
+package a
+
+var A = []*[2][1]float64{}
diff --git a/test/fixedbugs/issue8060.dir/b.go b/test/fixedbugs/issue8060.dir/b.go
new file mode 100644
index 000000000..85fb6ec7d
--- /dev/null
+++ b/test/fixedbugs/issue8060.dir/b.go
@@ -0,0 +1,13 @@
+// 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.
+
+package b
+
+import "a"
+
+var X = a.A
+
+func b() {
+ _ = [3][1]float64{}
+}
diff --git a/test/fixedbugs/issue8060.go b/test/fixedbugs/issue8060.go
new file mode 100644
index 000000000..ec52659e6
--- /dev/null
+++ b/test/fixedbugs/issue8060.go
@@ -0,0 +1,9 @@
+// compiledir
+
+// 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 8060: internal compiler error.
+
+package ignored