Fixes #5105.
R=golang-dev, dave, daniel.morsing, rsc
CC=golang-dev
https://golang.org/cl/
7965043
break;
case ALOCALS:
+ if(skip)
+ goto casedef;
cursym->locals = p->to.offset;
pc++;
break;
case ATYPE:
+ if(skip)
+ goto casedef;
pc++;
goto loop;
goto loop;
case ALOCALS:
+ if(skip)
+ goto casdef;
cursym->locals = p->to.offset;
pc++;
goto loop;
case ATYPE:
+ if(skip)
+ goto casdef;
pc++;
goto loop;
goto loop;
case ALOCALS:
+ if(skip)
+ goto casdef;
cursym->locals = p->to.offset;
pc++;
goto loop;
case ATYPE:
+ if(skip)
+ goto casdef;
pc++;
goto loop;
--- /dev/null
+// Copyright 2013 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]string{"hello", "world"}
--- /dev/null
+// Copyright 2013 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 main
+
+import "./a"
+
+var B = [2]string{"world", "hello"}
+
+func main() {
+ if a.A[0] != B[1] {
+ panic("bad hello")
+ }
+}
--- /dev/null
+// rundir
+
+// Copyright 2013 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 5105: linker segfaults on duplicate definition
+// of a type..hash.* function.
+
+package ignored