diff options
Diffstat (limited to 'src/cmd/compile/internal/gc/main.go')
-rw-r--r-- | src/cmd/compile/internal/gc/main.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/cmd/compile/internal/gc/main.go b/src/cmd/compile/internal/gc/main.go index df6a9d8e45..c1f51e4f1d 100644 --- a/src/cmd/compile/internal/gc/main.go +++ b/src/cmd/compile/internal/gc/main.go @@ -208,6 +208,11 @@ func Main(archInit func(*ssagen.ArchInfo)) { dwarfgen.RecordPackageName() ssagen.CgoSymABIs() + // Build init task. + if initTask := pkginit.Task(); initTask != nil { + typecheck.Export(initTask) + } + // Compute Addrtaken for names. // We need to wait until typechecking is done so that when we see &x[i] // we know that x has its address taken if x is an array, but not if x is a slice. @@ -249,11 +254,6 @@ func Main(archInit func(*ssagen.ArchInfo)) { typecheck.AllImportedBodies() } - // Build init task. - if initTask := pkginit.Task(); initTask != nil { - typecheck.Export(initTask) - } - // Inlining base.Timer.Start("fe", "inlining") if base.Flag.LowerL != 0 { |