From 20c349e5344152b56145ef6ebb649f431bdb2c90 Mon Sep 17 00:00:00 2001 From: Cuong Manh Le Date: Fri, 10 Feb 2023 02:20:56 +0700 Subject: [PATCH] cmd/compile: reenable inline static init Updates #58293 Updates #58339 Fixes #58439 Change-Id: I06d2d92f86fa4a672d69515c4066d69d3e0fc75b Reviewed-on: https://go-review.googlesource.com/c/go/+/467016 TryBot-Result: Gopher Robot Reviewed-by: Keith Randall Reviewed-by: David Chase Reviewed-by: Keith Randall Run-TryBot: Cuong Manh Le --- src/cmd/compile/internal/base/flag.go | 2 +- test/fixedbugs/issue56778.go | 2 +- test/fixedbugs/issue58439.go | 2 +- test/inline.go | 2 +- test/noinit.go | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/cmd/compile/internal/base/flag.go b/src/cmd/compile/internal/base/flag.go index 785cc4279a..f7f260d8d0 100644 --- a/src/cmd/compile/internal/base/flag.go +++ b/src/cmd/compile/internal/base/flag.go @@ -167,7 +167,7 @@ func ParseFlags() { Debug.ConcurrentOk = true Debug.InlFuncsWithClosures = 1 - Debug.InlStaticInit = 0 + Debug.InlStaticInit = 1 Debug.SyncFrames = -1 // disable sync markers by default Debug.Checkptr = -1 // so we can tell whether it is set explicitly diff --git a/test/fixedbugs/issue56778.go b/test/fixedbugs/issue56778.go index 3c27501fd2..8bb5c3e213 100644 --- a/test/fixedbugs/issue56778.go +++ b/test/fixedbugs/issue56778.go @@ -1,4 +1,4 @@ -// compiledir -d=inlstaticinit=1 +// compiledir // Copyright 2022 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/fixedbugs/issue58439.go b/test/fixedbugs/issue58439.go index daf188f039..ad3650f6be 100644 --- a/test/fixedbugs/issue58439.go +++ b/test/fixedbugs/issue58439.go @@ -1,4 +1,4 @@ -// compile -d=inlstaticinit +// compile // Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/inline.go b/test/inline.go index 3bc102f769..45a6255efc 100644 --- a/test/inline.go +++ b/test/inline.go @@ -1,4 +1,4 @@ -// errorcheckwithauto -0 -m -d=inlfuncswithclosures=1 -d=inlstaticinit=1 +// errorcheckwithauto -0 -m -d=inlfuncswithclosures=1 // Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/noinit.go b/test/noinit.go index 1496b27248..84aeeafb59 100644 --- a/test/noinit.go +++ b/test/noinit.go @@ -1,4 +1,4 @@ -// run -gcflags=-d=inlstaticinit=1 +// run //go:build !gcflags_noopt // Copyright 2010 The Go Authors. All rights reserved.