cmd/gc: fix detection of initialization loop.
The compiler computes initialization order by finding a spanning tree between a package's global variables. But it does so by walking both variables and functions and stops detecting cycles between variables when they mix with a cycle of mutually recursive functions. Fixes #4847. R=golang-dev, daniel.morsing, rsc CC=golang-dev https://golang.org/cl/9663047
Showing
test/fixedbugs/issue4847.go
0 → 100644
Please
register
or
sign in
to comment