<pre class="notranslate">What steps will reproduce the problem?
1. Make a package X.
2. Write another package Y that (perhaps transitively) depends on X.
3. Write a test for package X that depends on Y, and have that test be in package X
(i.e. not in package X_test).
4. Build and run the test.

What is the expected output?
6l should refuse to link the test due to the cycle.

What do you see instead?
One of two things:
  - 6l refuses to link the test due to "linker skew", or
  - 6l links the test, and the resultant test binary ends up initialising package X twice.

Which compiler are you using (5g, 6g, 8g, gccgo)?
6g/6l.

Which operating system are you using?
Linux.

Which revision are you using?  (hg identify)
weekly.2011-06-16
(but it's been around since March)</pre>
<pre class="notranslate">this code fails with the following error messages:
under revision d5e8f3fa95c4 tip.

/tmp/go-build221965265/local/test/_obj/_cgo_gotypes.go:14: invalid recursive type
_Ctype_U
/tmp/go-build221965265/local/test/_obj/_cgo_gotypes.go:14: invalid recursive type
_Ctype_union___0

this might easily be the same as <a href="https://golang.org/issue/3082" rel="nofollow">issue #3082</a>.

package foo

/*
typedef union
{
  int a;
} U;

U* mkT() {
    return 0;
}
*/
import "C"

func Foo() {
    C.mkT()
}</pre>