There is no necessary relationship between the imports of the
packages a and b, and gccgo happens to import them in a
different order, leading to different output. This ordering
is not the purpose of the test in any case.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/
40400043
package a
+var A int
+
func init() {
- println("a");
+ A = 1
}
type T int;
package b
+var B int
+
func init() {
- println("b");
+ B = 2
}
type V int;
var _ V
func main() {
+ if A != 1 || B != 2 {
+ panic("wrong vars")
+ }
}
-// rundircmpout
+// rundir
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style