diff --git a/src/cmd/compile/internal/types2/stdlib_test.go b/src/cmd/compile/internal/types2/stdlib_test.go index ae0f800d1e5744932a6e88a71fb564f059a1cbd2..7c14e3476e7baffc157c1c491daddabaef78b634 100644 --- a/src/cmd/compile/internal/types2/stdlib_test.go +++ b/src/cmd/compile/internal/types2/stdlib_test.go @@ -191,7 +191,7 @@ func firstComment(filename string) (first string) { } text = strings.TrimSpace(text[2:]) - if strings.HasPrefix(text, "+build ") { + if strings.HasPrefix(text, "go:build ") { panic("skip") } if first == "" { diff --git a/src/go/types/stdlib_test.go b/src/go/types/stdlib_test.go index e490dea848b8ad21f325ce1b42b1dd24a3a38b9c..f90f9388c2809fedefba8f881260216a2728e3bf 100644 --- a/src/go/types/stdlib_test.go +++ b/src/go/types/stdlib_test.go @@ -192,7 +192,7 @@ func firstComment(filename string) string { lit = lit[:len(lit)-2] } contents := strings.TrimSpace(lit[2:]) - if strings.HasPrefix(contents, "+build ") { + if strings.HasPrefix(contents, "go:build ") { return "skip" } if first == "" { diff --git a/test/abi/bad_internal_offsets.go b/test/abi/bad_internal_offsets.go index d396c1a60f722667ca767bf3550a842c0e90e64d..bad4ebdc8ecb305f91439ccb1e52e501469b1a49 100644 --- a/test/abi/bad_internal_offsets.go +++ b/test/abi/bad_internal_offsets.go @@ -1,7 +1,6 @@ // compile //go:build !wasm -// +build !wasm // Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/abi/double_nested_addressed_struct.go b/test/abi/double_nested_addressed_struct.go index be7c88aaaf4d90f92601f4acfe13aaf7d17fd602..c3e68a1783fc65523420b52c2eba73702177a8bb 100644 --- a/test/abi/double_nested_addressed_struct.go +++ b/test/abi/double_nested_addressed_struct.go @@ -1,7 +1,6 @@ // run //go:build !wasm -// +build !wasm // Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/abi/double_nested_struct.go b/test/abi/double_nested_struct.go index 814341e701935e953c5122e7743ffd88959d0dd1..0dce143f57ac7b58e7e7c25a7c46ce01d9404e81 100644 --- a/test/abi/double_nested_struct.go +++ b/test/abi/double_nested_struct.go @@ -1,7 +1,6 @@ // run //go:build !wasm -// +build !wasm // Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/abi/f_ret_z_not.go b/test/abi/f_ret_z_not.go index 63d6c7918fbb6d2e1c1b37ef259160478007b836..0fec654e4b298612adc3a6bc35281b4bf2a7dd6a 100644 --- a/test/abi/f_ret_z_not.go +++ b/test/abi/f_ret_z_not.go @@ -1,7 +1,6 @@ // run //go:build !wasm -// +build !wasm // Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/abi/fibish.go b/test/abi/fibish.go index b72f1322deb11ca26a5f460b7c98f50098cb30fd..20ed92437a085ab6a68d6009fa8e6146f3f30bbb 100644 --- a/test/abi/fibish.go +++ b/test/abi/fibish.go @@ -1,7 +1,6 @@ // run //go:build !wasm -// +build !wasm // Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/abi/fibish_closure.go b/test/abi/fibish_closure.go index 988001ebac223c108f63975decb68e6476dc86fe..682886cec425b2b21f121e2bf66dc5d1c368abeb 100644 --- a/test/abi/fibish_closure.go +++ b/test/abi/fibish_closure.go @@ -1,7 +1,6 @@ // run //go:build !wasm -// +build !wasm // Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/abi/leaf.go b/test/abi/leaf.go index f893f5dddb40b957274a628c340482a7ea74419e..fb1be5cd8af4b468b9d0a21eef0fcc8435613cd1 100644 --- a/test/abi/leaf.go +++ b/test/abi/leaf.go @@ -1,7 +1,6 @@ // run //go:build !wasm -// +build !wasm // Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/abi/leaf2.go b/test/abi/leaf2.go index d2018d5313a3a5dbd8935e3be90f9e0cc6974c47..fdad59cf7ec8dfe085fc9c3450f63a86758f8eea 100644 --- a/test/abi/leaf2.go +++ b/test/abi/leaf2.go @@ -1,7 +1,6 @@ // run //go:build !wasm -// +build !wasm // Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/abi/many_int_input.go b/test/abi/many_int_input.go index 8fda937932c7e045e2fe414f7bcf4900fe0a8945..046e31c39da1b84b647cea1eebb07ac9cd1c8251 100644 --- a/test/abi/many_int_input.go +++ b/test/abi/many_int_input.go @@ -1,7 +1,6 @@ // run //go:build !wasm -// +build !wasm // Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/abi/many_intstar_input.go b/test/abi/many_intstar_input.go index b209c801bae971e2873700d4bc5ffce1a20b6dbf..dc9e43b5abfb1c3678af8aee325dacf3c4ddd684 100644 --- a/test/abi/many_intstar_input.go +++ b/test/abi/many_intstar_input.go @@ -1,7 +1,6 @@ // run //go:build !wasm -// +build !wasm // Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/abi/more_intstar_input.go b/test/abi/more_intstar_input.go index 3eb0fbcc3d818dbd3ddeba00c733957ca3619d89..256081d0f5db21d2e1c4575d27d6e868459bd791 100644 --- a/test/abi/more_intstar_input.go +++ b/test/abi/more_intstar_input.go @@ -1,7 +1,6 @@ // run //go:build !wasm -// +build !wasm // Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/abi/named_results.go b/test/abi/named_results.go index eaaadb184f375cb81edb1ba10b0a22bd6dc1a9f1..07ea4610bf090fb460d84f71e281ea87880300a5 100644 --- a/test/abi/named_results.go +++ b/test/abi/named_results.go @@ -1,7 +1,6 @@ // run //go:build !wasm -// +build !wasm // Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/abi/named_return_stuff.go b/test/abi/named_return_stuff.go index faa0221a3c1ed763ace461e75f7bca30a02aa95e..ac779f0dbec05696251b081b5b899943b3ab5e2e 100644 --- a/test/abi/named_return_stuff.go +++ b/test/abi/named_return_stuff.go @@ -1,7 +1,6 @@ // run //go:build !wasm -// +build !wasm // Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/abi/reg_not_ssa.go b/test/abi/reg_not_ssa.go index 5bd4b51a6b07b5dbdb7aea8cbed1c7240390fb1f..da0f40511612171961e6484798a418c5faced391 100644 --- a/test/abi/reg_not_ssa.go +++ b/test/abi/reg_not_ssa.go @@ -1,7 +1,6 @@ // run //go:build !wasm -// +build !wasm // Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/abi/return_stuff.go b/test/abi/return_stuff.go index 130d8be5c5f561788727d38902c6dff5f36df4fc..222a9ee89ad6b9c69a8761c33865a5136bef2aeb 100644 --- a/test/abi/return_stuff.go +++ b/test/abi/return_stuff.go @@ -1,7 +1,6 @@ // run //go:build !wasm -// +build !wasm // Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/abi/s_sif_sif.go b/test/abi/s_sif_sif.go index f05f26f29f18932130cc5d4a1291f8f80ad90bc3..f57faac6740008782d34fcd2f7eba3dcc4a5630c 100644 --- a/test/abi/s_sif_sif.go +++ b/test/abi/s_sif_sif.go @@ -1,7 +1,6 @@ // run //go:build !wasm -// +build !wasm // Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/abi/spills3.go b/test/abi/spills3.go index 247828437bbfddecd1f2e45752d4065397f26c6e..4dee3eb679dda09d43e11325f5ecbfe6acd83b44 100644 --- a/test/abi/spills3.go +++ b/test/abi/spills3.go @@ -1,7 +1,6 @@ // run //go:build !wasm -// +build !wasm // Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/abi/spills4.go b/test/abi/spills4.go index 205f5a64c02712effbefce9a056f1e7aaca08a08..646d6965d8223aea7b75538164648d35b7788f58 100644 --- a/test/abi/spills4.go +++ b/test/abi/spills4.go @@ -1,7 +1,6 @@ // run //go:build !wasm -// +build !wasm // Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/abi/struct_3_string_input.go b/test/abi/struct_3_string_input.go index 54a8b38af9bbd03ee147c7e5f63aae674487dad8..2291bbb036bfbe58204a2a95e06af2cbbd2236fd 100644 --- a/test/abi/struct_3_string_input.go +++ b/test/abi/struct_3_string_input.go @@ -1,7 +1,6 @@ // run //go:build !wasm -// +build !wasm // Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/abi/struct_lower_1.go b/test/abi/struct_lower_1.go index b20de9be4b6cc8d2bb6b263eb428430ac199c575..363b85c019e06dd5f59796c34c0c945165b4264d 100644 --- a/test/abi/struct_lower_1.go +++ b/test/abi/struct_lower_1.go @@ -1,7 +1,6 @@ // run //go:build !wasm -// +build !wasm // Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/abi/too_big_to_ssa.go b/test/abi/too_big_to_ssa.go index 6c55d31419daf9fb84bc6ed917c5a3813567b5c7..e10acd17529f5f6f2a6f8215b20d2c296a9fc75a 100644 --- a/test/abi/too_big_to_ssa.go +++ b/test/abi/too_big_to_ssa.go @@ -1,7 +1,6 @@ // run //go:build !wasm -// +build !wasm // Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/abi/uglyfib.go b/test/abi/uglyfib.go index b8e8739f30c34def236b676b8343dd85812677ef..9c9d7101054279e4be2e197518d51c168b761b67 100644 --- a/test/abi/uglyfib.go +++ b/test/abi/uglyfib.go @@ -1,7 +1,6 @@ // run //go:build !wasm -// +build !wasm // Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/abi/wrapdefer_largetmp.go b/test/abi/wrapdefer_largetmp.go index fb6eebaaca19710fd2c46afad448e6278f8c0688..1aaaade39c4e0a4b9004a2473cc5885077f27ebf 100644 --- a/test/abi/wrapdefer_largetmp.go +++ b/test/abi/wrapdefer_largetmp.go @@ -1,7 +1,6 @@ // run //go:build !wasm -// +build !wasm // Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/chanlinear.go b/test/chanlinear.go index 4d55586dc8fce874484323cd27b5142ad7e91c15..87faa84c93071925d51df04e5556f207c05479c2 100644 --- a/test/chanlinear.go +++ b/test/chanlinear.go @@ -1,6 +1,7 @@ -// +build darwin linux // run +//go:build darwin || linux + // Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/test/checkbce.go b/test/checkbce.go index ab31d9528386d0f0d142c1f31163ac83243d4f10..71acfb71ac17d46ec08acde3f0d878f40c8cec65 100644 --- a/test/checkbce.go +++ b/test/checkbce.go @@ -1,6 +1,7 @@ -// +build amd64,!gcflags_noopt // errorcheck -0 -d=ssa/check_bce/debug=3 +//go:build amd64 && !gcflags_noopt + // Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/test/closure3.go b/test/closure3.go index 14764d107090e606b35dbd33eba57ef7dc4e0c17..24f8cefc30897489cdec9c0038c6c457436ab450 100644 --- a/test/closure3.go +++ b/test/closure3.go @@ -1,7 +1,6 @@ // errorcheckandrundir -0 -m -d=inlfuncswithclosures=1 //go:build !goexperiment.newinliner -// +build !goexperiment.newinliner // Copyright 2017 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/codegen/clobberdead.go b/test/codegen/clobberdead.go index 732be5f73b9954a01438f380f9ce6724e5a32c86..13d2efbbe58ef04d4581c447b02283b883d8e85a 100644 --- a/test/codegen/clobberdead.go +++ b/test/codegen/clobberdead.go @@ -1,6 +1,6 @@ // asmcheck -gcflags=-clobberdead -// +build amd64 arm64 +//go:build amd64 || arm64 // Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/codegen/clobberdeadreg.go b/test/codegen/clobberdeadreg.go index 2a93c410f9d3cde8506fdf596714c36ad21c6f49..39c4a743cb9e808aaae398ba243a9b408ac7d58b 100644 --- a/test/codegen/clobberdeadreg.go +++ b/test/codegen/clobberdeadreg.go @@ -1,6 +1,6 @@ // asmcheck -gcflags=-clobberdeadreg -// +build amd64 +//go:build amd64 // Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/codegen/retpoline.go b/test/codegen/retpoline.go index a04a005e2ed526290d6baef816aec550e5bd76cb..0e8f661ec99d2d6101b16e6be4b92e1e29a0b36e 100644 --- a/test/codegen/retpoline.go +++ b/test/codegen/retpoline.go @@ -1,6 +1,7 @@ -// +build amd64 // asmcheck -gcflags=-spectre=ret +//go:build amd64 + package codegen func CallFunc(f func()) { diff --git a/test/codegen/spectre.go b/test/codegen/spectre.go index edc8b28028066d926367fe983287d10fae61a3d6..1b22b77aa6ade99af81b1c2c8a7823372e43aa1a 100644 --- a/test/codegen/spectre.go +++ b/test/codegen/spectre.go @@ -1,6 +1,7 @@ -// +build amd64 // asmcheck -gcflags=-spectre=index +//go:build amd64 + // Copyright 2020 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/test/codegen/structs.go b/test/codegen/structs.go index fc49a69375497eeafea157ec6735f021fdf8f18f..49a201f7432513e468448889c7c1583398fe8a73 100644 --- a/test/codegen/structs.go +++ b/test/codegen/structs.go @@ -1,7 +1,6 @@ // asmcheck //go:build !goexperiment.cgocheck2 -// +build !goexperiment.cgocheck2 // Copyright 2018 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/fixedbugs/bug248.go b/test/fixedbugs/bug248.go index 93d2fdb67117a577c8bc3a13d703b4fdbfc22411..bd305a867c03e0e2e94881376c6ce4f58e63687f 100644 --- a/test/fixedbugs/bug248.go +++ b/test/fixedbugs/bug248.go @@ -1,6 +1,7 @@ -// +build !nacl,!js,!plan9 // errorcheckandrundir -1 +//go:build !nacl && !js && !plan9 + // Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/test/fixedbugs/bug369.go b/test/fixedbugs/bug369.go index 47258fe3fe9feb8bfdb5f766688d563da4c64d24..f5dad370dbee6eda6ee9c27015dcf0037684efe2 100644 --- a/test/fixedbugs/bug369.go +++ b/test/fixedbugs/bug369.go @@ -1,6 +1,7 @@ -// +build !nacl,!js,!wasip1,gc // run +//go:build !nacl && !js && !wasip1 && gc + // Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/test/fixedbugs/bug385_32.go b/test/fixedbugs/bug385_32.go index 73a1311f3223f26624fbd078504689aa4fdd9822..d9314c7e5d809f6d102aaee310f7a90001e6414b 100644 --- a/test/fixedbugs/bug385_32.go +++ b/test/fixedbugs/bug385_32.go @@ -1,6 +1,7 @@ -// +build 386 amd64p32 arm // errorcheck +//go:build 386 || amd64p32 || arm + // Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/test/fixedbugs/bug385_64.go b/test/fixedbugs/bug385_64.go index 0f941ca2f4dfa2d8da31c09209345a6162604ab1..3240960f1ad35a072a45dee8e3f09db8d3ab07af 100644 --- a/test/fixedbugs/bug385_64.go +++ b/test/fixedbugs/bug385_64.go @@ -1,6 +1,7 @@ -// +build amd64 // errorcheck +//go:build amd64 + // Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/test/fixedbugs/bug513.go b/test/fixedbugs/bug513.go index 459a9c396ac8cf752db159444679ab40a2016321..ce7ebf9b4ebb1a8d18b84eba12edfede7580e082 100644 --- a/test/fixedbugs/bug513.go +++ b/test/fixedbugs/bug513.go @@ -1,6 +1,6 @@ // run -race -gcflags=all=-d=checkptr=0 -// +build linux,amd64 linux,ppc64le darwin,amd64 freebsd,amd64 netbsd,amd64 windows,amd64 -// +build cgo + +//go:build ((linux && amd64) || (linux && ppc64le) || (darwin && amd64) || (freebsd && amd64) || (netbsd && amd64) || (windows && amd64)) && cgo // Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/fixedbugs/issue10607.go b/test/fixedbugs/issue10607.go index a2f9f3040bfd0132ba048f813ef6f63881780bcc..d7be61842bb7186b26c737395deee9da93d8f9df 100644 --- a/test/fixedbugs/issue10607.go +++ b/test/fixedbugs/issue10607.go @@ -1,8 +1,7 @@ -//go:build linux && !ppc64 && gc && cgo -// +build linux,!ppc64,gc,cgo - // run +//go:build linux && !ppc64 && gc && cgo + // Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/test/fixedbugs/issue10958.go b/test/fixedbugs/issue10958.go index 52487fb9bd61241010570ffdf24e06f486086727..d0b39587bb8f8f011c38bcbde5aa639773c91a19 100644 --- a/test/fixedbugs/issue10958.go +++ b/test/fixedbugs/issue10958.go @@ -1,6 +1,7 @@ -// +build !nacl,!js,disabled_see_issue_18589 // buildrun -t 10 -gcflags=-d=ssa/insert_resched_checks/on,ssa/check/on +//go:build !nacl && !js && disabled_see_issue_18589 + // Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/test/fixedbugs/issue11326b.go b/test/fixedbugs/issue11326b.go index b5f933bfea1153c37c28ee3b4c5f897f18b36f06..5db083a989947bd04628f8f17d665b4f1eabe95f 100644 --- a/test/fixedbugs/issue11326b.go +++ b/test/fixedbugs/issue11326b.go @@ -2,7 +2,7 @@ // Does not work with gccgo, which uses a smaller (but still permitted) // exponent size. -// +build !gccgo +//go:build !gccgo // Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/fixedbugs/issue11656.dir/asm.go b/test/fixedbugs/issue11656.dir/asm.go index cdcb064dc572c51d7aceba1185401b781f7eed8b..c64302bd505e4562cc4529d9f3ca13b927a8e6e4 100644 --- a/test/fixedbugs/issue11656.dir/asm.go +++ b/test/fixedbugs/issue11656.dir/asm.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build ppc64 || ppc64le -// +build ppc64 ppc64le package main diff --git a/test/fixedbugs/issue11656.dir/asm_generic.go b/test/fixedbugs/issue11656.dir/asm_generic.go index 104d44dfeb49ad6e77da4b8cafcff241e46128ca..a8b8f6a5e4f2af436f2bbd65b4b64b94f7bfa9bc 100644 --- a/test/fixedbugs/issue11656.dir/asm_generic.go +++ b/test/fixedbugs/issue11656.dir/asm_generic.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !ppc64 && !ppc64le -// +build !ppc64,!ppc64le package main diff --git a/test/fixedbugs/issue11656.go b/test/fixedbugs/issue11656.go index dba8e354391818b25f028514dd1465a320143ee1..2d746891d62a6319a4df95472ff5b9ddce20e0c2 100644 --- a/test/fixedbugs/issue11656.go +++ b/test/fixedbugs/issue11656.go @@ -17,6 +17,5 @@ // able to unwind past that point. //go:build !windows && !wasm && !gccgo -// +build !windows,!wasm,!gccgo package ignored diff --git a/test/fixedbugs/issue11771.go b/test/fixedbugs/issue11771.go index 657e1b0519bcfe94a5af49efcb9991d1a5988940..0c6b769d720800160fecd7d91f3198604f0d7444 100644 --- a/test/fixedbugs/issue11771.go +++ b/test/fixedbugs/issue11771.go @@ -1,6 +1,7 @@ -// +build !nacl,!js,!wasip1,gc // run +//go:build !nacl && !js && !wasip1 && gc + // Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/test/fixedbugs/issue12411.go b/test/fixedbugs/issue12411.go index ff49314a6b5789e1571b78e241266281b505db6f..19275d94a2a2c7ff0b1fb048ea42a65589f3bbd1 100644 --- a/test/fixedbugs/issue12411.go +++ b/test/fixedbugs/issue12411.go @@ -1,6 +1,7 @@ -// +build !386 // run +//go:build !386 + // Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/test/fixedbugs/issue13265.go b/test/fixedbugs/issue13265.go index 3e16cee6e75a5d06fa7ae785b934be4055b027e5..0a393a3614373f799c69731eecd894a0d8ad2999 100644 --- a/test/fixedbugs/issue13265.go +++ b/test/fixedbugs/issue13265.go @@ -1,5 +1,6 @@ // errorcheck -0 -race -// +build linux,amd64 linux,ppc64le darwin,amd64 freebsd,amd64 netbsd,amd64 windows,amd64 + +//go:build (linux && amd64) || (linux && ppc64le) || (darwin && amd64) || (freebsd && amd64) || (netbsd && amd64) || (windows && amd64) // Copyright 2017 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/fixedbugs/issue13268.go b/test/fixedbugs/issue13268.go index 53a82d5074ab97af601fee7bcb70ba84d60ff67a..da54b708a08224e714552395f296e2a6c8c1a43f 100644 --- a/test/fixedbugs/issue13268.go +++ b/test/fixedbugs/issue13268.go @@ -1,6 +1,7 @@ -// +build gc // run +//go:build gc + // Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/test/fixedbugs/issue14636.go b/test/fixedbugs/issue14636.go index 770fb4adc9162d76eadbcdc875426fdd26e03a7b..c8e751fb613c2e8120201dc3bd2c7bdd67b24e66 100644 --- a/test/fixedbugs/issue14636.go +++ b/test/fixedbugs/issue14636.go @@ -1,6 +1,7 @@ -// +build !nacl,!js,!wasip1,!android,gc // run +//go:build !nacl && !js && !wasip1 && !android && gc + // Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/test/fixedbugs/issue15002.go b/test/fixedbugs/issue15002.go index 936105ed126bd38e1128ce7e9721784c7f7b1e20..bb0fe424069870bf19b380db00d57edb6777cce2 100644 --- a/test/fixedbugs/issue15002.go +++ b/test/fixedbugs/issue15002.go @@ -1,6 +1,6 @@ // run -// +build amd64 -// +build linux darwin + +//go:build amd64 && (linux || darwin) // Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/fixedbugs/issue15091.go b/test/fixedbugs/issue15091.go index 678e7911c80232437f713df41b768d11b4382151..115ad6840fd4e1ffe8fcc5e2ecec75f53586d2aa 100644 --- a/test/fixedbugs/issue15091.go +++ b/test/fixedbugs/issue15091.go @@ -1,5 +1,6 @@ // errorcheck -0 -race -// +build linux,amd64 linux,ppc64le darwin,amd64 freebsd,amd64 netbsd,amd64 windows,amd64 + +//go:build (linux && amd64) || (linux && ppc64le) || (darwin && amd64) || (freebsd && amd64) || (netbsd && amd64) || (windows && amd64) // Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/fixedbugs/issue15277.go b/test/fixedbugs/issue15277.go index af165f7a6b25323449571d52e7996e63fafba91c..d22a305b0b53fb67af70b43f7d2e27d9ff40dafc 100644 --- a/test/fixedbugs/issue15277.go +++ b/test/fixedbugs/issue15277.go @@ -1,9 +1,10 @@ // run +//go:build amd64 + // Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build amd64 package main diff --git a/test/fixedbugs/issue15609.dir/call.go b/test/fixedbugs/issue15609.dir/call.go index 41a489cebd44cd9457cd00a3f21c2ea24c7a5b79..48f90fd607f9e7331f9478fe196e6eb27d61dda8 100644 --- a/test/fixedbugs/issue15609.dir/call.go +++ b/test/fixedbugs/issue15609.dir/call.go @@ -1,4 +1,4 @@ -// +build !amd64,!386 +//go:build !amd64 && !386 package main diff --git a/test/fixedbugs/issue15609.dir/call_decl.go b/test/fixedbugs/issue15609.dir/call_decl.go index d9c5a4e9f0f7958e6cf9181e905a33dcb1f7c6f0..cdca44a6542f80cb5fc591c63e85f5da704941a4 100644 --- a/test/fixedbugs/issue15609.dir/call_decl.go +++ b/test/fixedbugs/issue15609.dir/call_decl.go @@ -1,4 +1,4 @@ -// +build amd64 386 +//go:build amd64 || 386 package main diff --git a/test/fixedbugs/issue15609.go b/test/fixedbugs/issue15609.go index e0bf8a42d8c8c5ba09cd3aedecc9aef43af2f801..fa3b75501172013e2a82af016a4987c3ad61850a 100644 --- a/test/fixedbugs/issue15609.go +++ b/test/fixedbugs/issue15609.go @@ -1,6 +1,6 @@ // runindir -// +build !nacl +//go:build !nacl // Copyright 2019 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/fixedbugs/issue15747.go b/test/fixedbugs/issue15747.go index 7825958066118e57fdd5d8e0303b31ca39298642..92e762c4e923ac84b8ff2db61998ff0cdd7055df 100644 --- a/test/fixedbugs/issue15747.go +++ b/test/fixedbugs/issue15747.go @@ -1,7 +1,6 @@ // errorcheck -0 -live //go:build !goexperiment.cgocheck2 -// +build !goexperiment.cgocheck2 // Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/fixedbugs/issue16008.go b/test/fixedbugs/issue16008.go index b88e2351b7f58d8d0953ba63f0c4a2ff48149895..963137960bc3ff525fbdea1b2f20255cca97299b 100644 --- a/test/fixedbugs/issue16008.go +++ b/test/fixedbugs/issue16008.go @@ -1,5 +1,6 @@ // errorcheck -0 -race -// +build linux,amd64 linux,ppc64le darwin,amd64 freebsd,amd64 netbsd,amd64 windows,amd64 + +//go:build (linux && amd64) || (linux && ppc64le) || (darwin && amd64) || (freebsd && amd64) || (netbsd && amd64) || (windows && amd64) // Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/fixedbugs/issue16037_run.go b/test/fixedbugs/issue16037_run.go index 610fd2d395684ddbd359270013b4fdd7c51e088c..d5ad477391355283d4aae9343068ddc9196a13ac 100644 --- a/test/fixedbugs/issue16037_run.go +++ b/test/fixedbugs/issue16037_run.go @@ -1,6 +1,7 @@ -// +build !nacl,!js,!wasip1,!android,!gccgo // run +//go:build !nacl && !js && !wasip1 && !android && !gccgo + // Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/test/fixedbugs/issue17449.go b/test/fixedbugs/issue17449.go index 51cc8eaa06d855be87902ebb61e525cb016c4b1c..4e092faa7ff86a88ffe6374b6d27d2f3f452dfea 100644 --- a/test/fixedbugs/issue17449.go +++ b/test/fixedbugs/issue17449.go @@ -1,5 +1,6 @@ // errorcheck -0 -race -// +build linux,amd64 linux,ppc64le darwin,amd64 freebsd,amd64 netbsd,amd64 windows,amd64 + +//go:build (linux && amd64) || (linux && ppc64le) || (darwin && amd64) || (freebsd && amd64) || (netbsd && amd64) || (windows && amd64) // Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/fixedbugs/issue19182.go b/test/fixedbugs/issue19182.go index f5e44e98c2fe26dbe780f78e65d5adc126b2581a..544c4b0cebce7c19d706d67d91504dbb620bfcb6 100644 --- a/test/fixedbugs/issue19182.go +++ b/test/fixedbugs/issue19182.go @@ -1,5 +1,6 @@ // run -// +build !js,!wasip1 + +//go:build !js && !wasip1 // Copyright 2017 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/fixedbugs/issue19261.go b/test/fixedbugs/issue19261.go index 8650982a4cc46c1609a66af12b1afeb6a95fe8bb..1da90e94caf60461c8d083e1c5ad53098bb2d40c 100644 --- a/test/fixedbugs/issue19261.go +++ b/test/fixedbugs/issue19261.go @@ -1,7 +1,6 @@ // errorcheckdir -0 -m //go:build !goexperiment.newinliner -// +build !goexperiment.newinliner // Copyright 2017 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/fixedbugs/issue19507.dir/main.go b/test/fixedbugs/issue19507.dir/main.go index c115556f91dcb1bdf7dfd7d51c6f4d4d86791ac2..e4e72be87ded8d639369de0f8212229a1248f2a2 100644 --- a/test/fixedbugs/issue19507.dir/main.go +++ b/test/fixedbugs/issue19507.dir/main.go @@ -1,4 +1,4 @@ -// +build arm +//go:build arm // Copyright 2017 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/fixedbugs/issue19507.go b/test/fixedbugs/issue19507.go index 543e17e50b20b732ed0a2f6d68456f5c26ec4e94..ef0a9a1b78218b1e3c0be396e3af74f857f964b4 100644 --- a/test/fixedbugs/issue19507.go +++ b/test/fixedbugs/issue19507.go @@ -1,6 +1,7 @@ -// +build arm // builddir +//go:build arm + // Copyright 2017 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/test/fixedbugs/issue20250.go b/test/fixedbugs/issue20250.go index c739b6fb125ad51728036bff5209b04caf11e410..34184c48158e9682b9cfb0cd871c314265d49553 100644 --- a/test/fixedbugs/issue20250.go +++ b/test/fixedbugs/issue20250.go @@ -1,7 +1,6 @@ // errorcheck -0 -live -l //go:build !goexperiment.cgocheck2 -// +build !goexperiment.cgocheck2 // Copyright 2017 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/fixedbugs/issue20529.go b/test/fixedbugs/issue20529.go index eeaaf37358f8a55d02b44e6503112b774c7f6be4..118365d6bed6ca09498e966f2ef28176cbd39b41 100644 --- a/test/fixedbugs/issue20529.go +++ b/test/fixedbugs/issue20529.go @@ -1,6 +1,6 @@ // errorcheck -// +build amd64 +//go:build amd64 // Copyright 2017 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/fixedbugs/issue20780b.go b/test/fixedbugs/issue20780b.go index c8bf1f83499f4d149c4a9396aaf2ba71b252ffcb..8aba8548b87d89f2175cfd3ad210e804daf1b468 100644 --- a/test/fixedbugs/issue20780b.go +++ b/test/fixedbugs/issue20780b.go @@ -1,6 +1,7 @@ -// +build cgo,linux,amd64 // run -race +//go:build cgo && linux && amd64 + // Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/test/fixedbugs/issue21317.go b/test/fixedbugs/issue21317.go index 75d871cbae52a3eba84609ebfa3a59df144399a4..cebfc0f52d67935f8d6228fca818804ccefd79bd 100644 --- a/test/fixedbugs/issue21317.go +++ b/test/fixedbugs/issue21317.go @@ -1,6 +1,7 @@ -// +build !js,!wasip1,gc // run +//go:build !js && !wasip1 && gc + // Copyright 2017 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/test/fixedbugs/issue21576.go b/test/fixedbugs/issue21576.go index 8e1e3ad495ebd853364c7347b647dc346c5c512a..d5bfc2859b74d3993baf4add8f7a57af67b80f54 100644 --- a/test/fixedbugs/issue21576.go +++ b/test/fixedbugs/issue21576.go @@ -1,6 +1,6 @@ // run -// +build !nacl,!js,!wasip1,!gccgo +//go:build !nacl && !js && !wasip1 && !gccgo // Copyright 2019 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/fixedbugs/issue22200b.go b/test/fixedbugs/issue22200b.go index ce20923334c03230c05ee428fda2a0fb24a0ccaf..7babeec84707938c099d429eeee199d9d001facf 100644 --- a/test/fixedbugs/issue22200b.go +++ b/test/fixedbugs/issue22200b.go @@ -1,11 +1,11 @@ // errorcheck +//go:build !386 && !amd64p32 && !arm && !mips && !mipsle + // Copyright 2017 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build !386,!amd64p32,!arm,!mips,!mipsle - package p func f3(x *[1 << 31]byte) byte { // GC_ERROR "stack frame too large" diff --git a/test/fixedbugs/issue22660.go b/test/fixedbugs/issue22660.go index 150de174af97c083dabd87c6e5c14a3490bdbad9..10622033f0dc8d87564ae0024f49840c08c08138 100644 --- a/test/fixedbugs/issue22660.go +++ b/test/fixedbugs/issue22660.go @@ -1,6 +1,7 @@ -// +build !js,!wasip1,gc // run +//go:build !js && !wasip1 && gc + // Copyright 2017 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/test/fixedbugs/issue22662b.go b/test/fixedbugs/issue22662b.go index c7a1e0558b50168605d26283db153b9b59e64bf2..a58a2e0a1534d7dffcd03944bb597a98c7038cf9 100644 --- a/test/fixedbugs/issue22662b.go +++ b/test/fixedbugs/issue22662b.go @@ -1,6 +1,7 @@ -// +build !js,!wasip1,gc // run +//go:build !js && !wasip1 && gc + // Copyright 2018 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/test/fixedbugs/issue23781.go b/test/fixedbugs/issue23781.go index 5c03cf7e4ef530906d1a62d89d8ad4efc2a01041..194795132133119f2cd2a461011c79bd0f544ba8 100644 --- a/test/fixedbugs/issue23781.go +++ b/test/fixedbugs/issue23781.go @@ -1,6 +1,7 @@ -// +build amd64 // compile +//go:build amd64 + // Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/test/fixedbugs/issue24187.go b/test/fixedbugs/issue24187.go index 45fc92971072fdb257700bafd93490c509020e29..f697968a098fa72b68d6d4ab9be30346d5bf5518 100644 --- a/test/fixedbugs/issue24187.go +++ b/test/fixedbugs/issue24187.go @@ -1,6 +1,7 @@ -// +build amd64p32 // run +//go:build amd64p32 + // Copyright 2018 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/test/fixedbugs/issue24651a.go b/test/fixedbugs/issue24651a.go index 1bfe8ac1ce8243b77f1b4374d4c92b2776fc980f..74bcbb1faecbb23df303bcd40ee8b7316238f598 100644 --- a/test/fixedbugs/issue24651a.go +++ b/test/fixedbugs/issue24651a.go @@ -1,5 +1,6 @@ //errorcheck -0 -race -m -m -// +build linux,amd64 linux,ppc64le darwin,amd64 freebsd,amd64 netbsd,amd64 windows,amd64 + +//go:build (linux && amd64) || (linux && ppc64le) || (darwin && amd64) || (freebsd && amd64) || (netbsd && amd64) || (windows && amd64) // Copyright 2018 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/fixedbugs/issue26411.go b/test/fixedbugs/issue26411.go index 3ae9e03936135b0bf189931607352048f0959c03..d7b2a26ff49c17aa88fd384db400d09ece57b377 100644 --- a/test/fixedbugs/issue26411.go +++ b/test/fixedbugs/issue26411.go @@ -1,6 +1,7 @@ -// +build !nacl,!js,!wasip1 // run +//go:build !nacl && !js && !wasip1 + // Copyright 2018 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/test/fixedbugs/issue29329.go b/test/fixedbugs/issue29329.go index 7818bca30a02e657bf357c55fe0e3b74fd7ea3d8..07f96f431fab72660c6fe8c0d1a91335e832cc94 100644 --- a/test/fixedbugs/issue29329.go +++ b/test/fixedbugs/issue29329.go @@ -1,12 +1,11 @@ -// +build cgo // run -race +//go:build cgo && linux && amd64 + // Copyright 2018 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build linux,amd64 - package main import ( diff --git a/test/fixedbugs/issue30908.go b/test/fixedbugs/issue30908.go index 27f070ececc24f9afcf7c548323edcc6c38fb0ec..98dd641066fc6ea07b50dc6db8012377c12763ba 100644 --- a/test/fixedbugs/issue30908.go +++ b/test/fixedbugs/issue30908.go @@ -5,6 +5,5 @@ // license that can be found in the LICENSE file. //go:build !nacl && !js -// +build !nacl,!js package ignored diff --git a/test/fixedbugs/issue33275_run.go b/test/fixedbugs/issue33275_run.go index f2818b0f512a81f971c863d8a69305470916d2fb..542cc03f60dcd00bdfc841a6f7412affd7a456c4 100644 --- a/test/fixedbugs/issue33275_run.go +++ b/test/fixedbugs/issue33275_run.go @@ -1,6 +1,7 @@ -// +build !nacl,!js,!wasip1,!gccgo // run +//go:build !nacl && !js && !wasip1 && !gccgo + // Copyright 2019 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/test/fixedbugs/issue33555.go b/test/fixedbugs/issue33555.go index e7fe41e4516096fae377d317b0f66f860fd047f3..90d024470f718a85c2ebbead06856ba9c2c7e255 100644 --- a/test/fixedbugs/issue33555.go +++ b/test/fixedbugs/issue33555.go @@ -1,6 +1,7 @@ -// +build !nacl,!js,!wasip1,!gccgo // run +//go:build !nacl && !js && !wasip1 && !gccgo + // Copyright 2019 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/test/fixedbugs/issue34968.go b/test/fixedbugs/issue34968.go index 6b1dbd16edd2d03a962e966d75b9cd0b1e82dfe8..f328f04479e2cae210293eda3a87f2862c482ac3 100644 --- a/test/fixedbugs/issue34968.go +++ b/test/fixedbugs/issue34968.go @@ -1,6 +1,7 @@ -// +build cgo // run -gcflags=all=-d=checkptr +//go:build cgo + // Copyright 2019 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/test/fixedbugs/issue36437.go b/test/fixedbugs/issue36437.go index c16e7ef48f752865829a56c657d2fb72f9ead0de..72ea50bdadaf6bb584673bf9ccf28e508fad0f12 100644 --- a/test/fixedbugs/issue36437.go +++ b/test/fixedbugs/issue36437.go @@ -1,6 +1,6 @@ // run -// +build !nacl,!js,!wasip1,gc +//go:build !nacl && !js && !wasip1 && gc // Copyright 2020 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/fixedbugs/issue36516.go b/test/fixedbugs/issue36516.go index d4e28b636d5b4d7dd83420092e21da4098f1dd9e..68f655a568de5038210b3e38996c99c59fd7b1ef 100644 --- a/test/fixedbugs/issue36516.go +++ b/test/fixedbugs/issue36516.go @@ -1,6 +1,7 @@ -// +build cgo,linux,amd64 // run -race +//go:build cgo && linux && amd64 + // Copyright 2020 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/test/fixedbugs/issue36705.go b/test/fixedbugs/issue36705.go index b0485c633566c2887fbda1782c3cc08570b3976f..9aad8a7f813edbe1c4b8419ea0978cf6c010c0f3 100644 --- a/test/fixedbugs/issue36705.go +++ b/test/fixedbugs/issue36705.go @@ -1,6 +1,7 @@ -// +build cgo,!windows // run fake-arg-to-force-use-of-go-run +//go:build cgo && !windows + // Copyright 2020 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/test/fixedbugs/issue37513.go b/test/fixedbugs/issue37513.go index e05b2d861f52dbe8c18e2e27878eba37678868f5..957032519cab6430ccd9bb25ced7ec221039984a 100644 --- a/test/fixedbugs/issue37513.go +++ b/test/fixedbugs/issue37513.go @@ -4,6 +4,6 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build linux,amd64 darwin,amd64 linux,386 +//go:build (linux && amd64) || (darwin && amd64) || (linux && 386) package ignored diff --git a/test/fixedbugs/issue38093.go b/test/fixedbugs/issue38093.go index db92664a49c9b6dad4492688900a07ebba1e502d..af476aba48a3e1c43cbffd7fe14242fd71c00c9f 100644 --- a/test/fixedbugs/issue38093.go +++ b/test/fixedbugs/issue38093.go @@ -1,6 +1,7 @@ -// +build js // run +//go:build js + // Copyright 2020 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/test/fixedbugs/issue4099.go b/test/fixedbugs/issue4099.go index 7e9790ff68876c090ba46575211856c1da82f704..edbbfebc20cf200cde9c1be5b59528035938f03d 100644 --- a/test/fixedbugs/issue4099.go +++ b/test/fixedbugs/issue4099.go @@ -1,7 +1,6 @@ // errorcheck -0 -m //go:build !goexperiment.newinliner -// +build !goexperiment.newinliner // Copyright 2013 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/fixedbugs/issue42284.go b/test/fixedbugs/issue42284.go index 95da611f13f0b9f2200703fdf2a6a640fb552a67..a1a525b8bdb583660db5e8e3cec550e940f4d802 100644 --- a/test/fixedbugs/issue42284.go +++ b/test/fixedbugs/issue42284.go @@ -1,7 +1,6 @@ // errorcheckdir -0 -m //go:build !goexperiment.newinliner -// +build !goexperiment.newinliner // Copyright 2020 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/fixedbugs/issue46234.go b/test/fixedbugs/issue46234.go index ae280190ebc5985372a88fc9ce29ec782e9c7c23..9c346dd95c3a919a0ea6cdb60e04d947fc5d5587 100644 --- a/test/fixedbugs/issue46234.go +++ b/test/fixedbugs/issue46234.go @@ -1,7 +1,6 @@ // buildrun -t 45 //go:build !js && !wasip1 -// +build !js,!wasip1 // Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/fixedbugs/issue47185.go b/test/fixedbugs/issue47185.go index 9c921b869846986fbcb10452755510406286b43f..91c7e0ad3a5d990922d964b103b638f02c93ec66 100644 --- a/test/fixedbugs/issue47185.go +++ b/test/fixedbugs/issue47185.go @@ -1,6 +1,7 @@ -// +build cgo // runindir +//go:build cgo + // Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/test/fixedbugs/issue47227.go b/test/fixedbugs/issue47227.go index a14efc9a689410ccfe66ac2c94ee120524640215..14c3b1521277bd791c0ab87153a21fe10abc9b83 100644 --- a/test/fixedbugs/issue47227.go +++ b/test/fixedbugs/issue47227.go @@ -5,7 +5,6 @@ // license that can be found in the LICENSE file. //go:build cgo -// +build cgo package main diff --git a/test/fixedbugs/issue52127.go b/test/fixedbugs/issue52127.go index 68abe3fdbb76f4b2d30bae7415e17c43af3ee6b8..b40c194b3ee96aec70b7bdfe31bb2be7cc74bbf2 100644 --- a/test/fixedbugs/issue52127.go +++ b/test/fixedbugs/issue52127.go @@ -1,6 +1,6 @@ // run + //go:build !js && !wasip1 -// +build !js,!wasip1 // Copyright 2022 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/fixedbugs/issue6036.go b/test/fixedbugs/issue6036.go index 8ebef5a447cde593de85e51d26e0271faf3deeeb..e7c2557864356c54fb1bb44acf8d2ca50136a7db 100644 --- a/test/fixedbugs/issue6036.go +++ b/test/fixedbugs/issue6036.go @@ -1,6 +1,7 @@ -// +build !386,!arm,!mips,!mipsle,!amd64p32 // compile +//go:build !386 && !arm && !mips && !mipsle && !amd64p32 + // Copyright 2013 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/test/fixedbugs/issue8606b.go b/test/fixedbugs/issue8606b.go index 41b9a3d00eab60a776f89a867372a1337f052ba8..6a56c0df89c8e3398dd45f119f8534eca4daf9d3 100644 --- a/test/fixedbugs/issue8606b.go +++ b/test/fixedbugs/issue8606b.go @@ -1,5 +1,6 @@ // run -// +build linux darwin + +//go:build linux || darwin // Copyright 2020 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/fixedbugs/issue9355.go b/test/fixedbugs/issue9355.go index 075e7ebbffba94045d348f9672c7c15e456000e0..4e6cbf0395e7ff45aed995702bf35f63ea4b9f29 100644 --- a/test/fixedbugs/issue9355.go +++ b/test/fixedbugs/issue9355.go @@ -1,6 +1,7 @@ -// +build !js,!wasip1,gc // run +//go:build !js && !wasip1 && gc + // Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/test/fixedbugs/issue9604b.go b/test/fixedbugs/issue9604b.go index d32116b8573a5dee1809f1609873ce59f1cfe324..0033a6ff951fee85a9f400bd499633888949b2de 100644 --- a/test/fixedbugs/issue9604b.go +++ b/test/fixedbugs/issue9604b.go @@ -5,7 +5,7 @@ // license that can be found in the LICENSE file. // terribly slow on wasm -// +build !wasm +//go:build !wasm package main diff --git a/test/fixedbugs/issue9862_run.go b/test/fixedbugs/issue9862_run.go index edf8dfaf32a9acdb6ba6a0c2b358e0c8ec8703d9..8c5caa337349f32ea116d6535b29e216d3fcd681 100644 --- a/test/fixedbugs/issue9862_run.go +++ b/test/fixedbugs/issue9862_run.go @@ -1,6 +1,7 @@ -// +build !nacl,!js,!wasip1,gc // run +//go:build !nacl && !js && !wasip1 && gc + // Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/test/fuse.go b/test/fuse.go index ea908bfd4d4aead13466d440327b724811ae4187..f64a087965ae096346e2e7e985794f38380023fa 100644 --- a/test/fuse.go +++ b/test/fuse.go @@ -1,6 +1,7 @@ -// +build amd64,!gcflags_noopt arm64,!gcflags_noopt // errorcheck -0 -d=ssa/late_fuse/debug=1 +//go:build (amd64 && !gcflags_noopt) || (arm64 && !gcflags_noopt) + // Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/test/gc2.go b/test/gc2.go index 2f8eb9b70e66fdac06c40bf2dba4ccbdb27f78a3..954a021a144599a43922a34ffc3a6574b2cabf97 100644 --- a/test/gc2.go +++ b/test/gc2.go @@ -1,6 +1,7 @@ -// +build !nacl,!js // run +//go:build !nacl && !js + // Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/test/inline.go b/test/inline.go index 9bc0cf5e4bf40cdb70d5a0217ef45e3fefea8592..fd14f25983355597230030735903f98b6a890268 100644 --- a/test/inline.go +++ b/test/inline.go @@ -1,7 +1,6 @@ // errorcheckwithauto -0 -m -d=inlfuncswithclosures=1 //go:build !goexperiment.newinliner -// +build !goexperiment.newinliner // Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/inline_math_bits_rotate.go b/test/inline_math_bits_rotate.go index a0341ea4971e94840a7a54ec7e25e37fe41fddd3..ad15d60e0807f04251d9b99c0e0d06f09959b429 100644 --- a/test/inline_math_bits_rotate.go +++ b/test/inline_math_bits_rotate.go @@ -1,6 +1,7 @@ -// +build amd64 // errorcheck -0 -m +//go:build amd64 + // Copyright 2018 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/test/intrinsic.go b/test/intrinsic.go index 0b783d15df41a2f83d24fd854a284fcfbdbbb3bd..702b6acaf86ccda1fb16aa30ca36c28f4d19ff6b 100644 --- a/test/intrinsic.go +++ b/test/intrinsic.go @@ -1,5 +1,6 @@ // errorcheckandrundir -0 -d=ssa/intrinsics/debug -// +build amd64 arm64 arm s390x + +//go:build amd64 || arm64 || arm || s390x // Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/intrinsic_atomic.go b/test/intrinsic_atomic.go index a1004c89d9538d5bc7371f6064058c00f33296a9..72038e676a7951cfcf4a3bdd363c512d984172ff 100644 --- a/test/intrinsic_atomic.go +++ b/test/intrinsic_atomic.go @@ -1,5 +1,6 @@ // errorcheck -0 -d=ssa/intrinsics/debug -// +build amd64 arm64 loong64 mips mipsle mips64 mips64le ppc64 ppc64le riscv64 s390x + +//go:build amd64 || arm64 || loong64 || mips || mipsle || mips64 || mips64le || ppc64 || ppc64le || riscv64 || s390x // Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/linkmain.go b/test/linkmain.go index af20ca5838d20ff4b61901b0fd90e697f0309ab0..18962a9848b46143698f0ff252837de37324565f 100644 --- a/test/linkmain.go +++ b/test/linkmain.go @@ -1,4 +1,4 @@ -// +build ignore +//go:build ignore // Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/linkmain_run.go b/test/linkmain_run.go index f2ab681c0d27b73012ad142929a7408b92b45084..55aa65267303daeca1f5df739a142a72f66b03b3 100644 --- a/test/linkmain_run.go +++ b/test/linkmain_run.go @@ -1,6 +1,7 @@ -// +build !nacl,!js,!wasip1 // run +//go:build !nacl && !js && !wasip1 + // Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/test/linkobj.go b/test/linkobj.go index fcf3f88919d710dcb37d6b9dd40021737a759a96..85570269eb5c5ee7e075e04838c5e309530be0e1 100644 --- a/test/linkobj.go +++ b/test/linkobj.go @@ -1,6 +1,7 @@ -// +build !nacl,!js,gc,!wasip1 // run +//go:build !nacl && !js && gc && !wasip1 + // Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/test/linkx_run.go b/test/linkx_run.go index b7b1ea87f0b03de87c52876aa61ec8b91b62f7fb..15f7c9ab4f93451dad9100b2bdef1bd9b62a7b40 100644 --- a/test/linkx_run.go +++ b/test/linkx_run.go @@ -1,6 +1,7 @@ -// +build !nacl,!js,!wasip1,gc // run +//go:build !nacl && !js && !wasip1 && gc + // Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/test/live.go b/test/live.go index 8a8f8bb71fdd4887695cffafceaa48de3b868b7e..6badb011b006a39ab77639e57b6a9fbe56c46ee3 100644 --- a/test/live.go +++ b/test/live.go @@ -1,6 +1,6 @@ // errorcheckwithauto -0 -l -live -wb=0 -d=ssa/insert_resched_checks/off + //go:build !ppc64 && !ppc64le && !goexperiment.regabiargs -// +build !ppc64,!ppc64le,!goexperiment.regabiargs // ppc64 needs a better tighten pass to make f18 pass // rescheduling checks need to be turned off because there are some live variables across the inserted check call diff --git a/test/live_regabi.go b/test/live_regabi.go index 0b7f2eeb4e35edd494b51c40efee3142faea1ea1..80a9cc1002ba93c3a105a117db73b2bfae78c3aa 100644 --- a/test/live_regabi.go +++ b/test/live_regabi.go @@ -1,6 +1,6 @@ // errorcheckwithauto -0 -l -live -wb=0 -d=ssa/insert_resched_checks/off + //go:build (amd64 && goexperiment.regabiargs) || (arm64 && goexperiment.regabiargs) -// +build amd64,goexperiment.regabiargs arm64,goexperiment.regabiargs // Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/live_uintptrkeepalive.go b/test/live_uintptrkeepalive.go index f681f683fcfba3fa81cf1d5fc8bce8ed830b2b46..ae41101954b7d3b41b9ea7f3f3757ca0cb1032cf 100644 --- a/test/live_uintptrkeepalive.go +++ b/test/live_uintptrkeepalive.go @@ -1,7 +1,6 @@ // errorcheck -0 -m -live -std //go:build !windows && !js && !wasip1 -// +build !windows,!js,!wasip1 // Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/loopbce.go b/test/loopbce.go index 1119aaa65aa3c8dc3a8479d8eb9644300ea91073..04c186be0eb194d52db47beb6955c0b4e7f5003e 100644 --- a/test/loopbce.go +++ b/test/loopbce.go @@ -1,6 +1,7 @@ -// +build amd64 // errorcheck -0 -d=ssa/prove/debug=1 +//go:build amd64 + package main import "math" diff --git a/test/maplinear.go b/test/maplinear.go index 34d091491480d741e51288c65ee267582d467afb..dbc68272bf054601d88f6057866bce874bf451f7 100644 --- a/test/maplinear.go +++ b/test/maplinear.go @@ -1,6 +1,7 @@ -// +build darwin linux // run +//go:build darwin || linux + // Copyright 2013 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/test/newinline.go b/test/newinline.go index e27f6c7457d60054300b95193e50719f8263d2fc..272eb82f3d9f50472957a18090799dab6802e779 100644 --- a/test/newinline.go +++ b/test/newinline.go @@ -1,7 +1,6 @@ // errorcheckwithauto -0 -m -d=inlfuncswithclosures=1 //go:build goexperiment.newinliner -// +build goexperiment.newinliner // Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/nilptr.go b/test/nilptr.go index b296c88c99408a6fe6a96c6a2f06a69b40c20606..7f42e930bdee7e95f13d28b8a3ccea4818501241 100644 --- a/test/nilptr.go +++ b/test/nilptr.go @@ -7,10 +7,8 @@ // Test that the implementation catches nil ptr indirection // in a large address space. -// +build !aix -// +build !darwin !arm64 -// +build !windows !arm64 // Address space starts at 1<<32 on AIX and on darwin/arm64 and on windows/arm64, so dummy is too far. +//go:build !aix && (!darwin || !arm64) && (!windows || !arm64) package main diff --git a/test/nilptr3.go b/test/nilptr3.go index 5f08a5b20c20191437894e7b8d3f279a6a92b466..2cc510beb635df01ae75e92ee06d51212e1ef34d 100644 --- a/test/nilptr3.go +++ b/test/nilptr3.go @@ -1,7 +1,6 @@ // errorcheck -0 -d=nil -// +build !wasm -// +build !aix +//go:build !wasm && !aix // Copyright 2013 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/nilptr5.go b/test/nilptr5.go index 118746e4aa9086ddc1cd6f7e66e6248c22ab71df..51a302f25218275b0d7ee4ddde303fa2bd1fb2b4 100644 --- a/test/nilptr5.go +++ b/test/nilptr5.go @@ -1,7 +1,6 @@ // errorcheck -0 -d=nil //go:build !wasm && !aix -// +build !wasm,!aix // Copyright 2018 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/nilptr5_aix.go b/test/nilptr5_aix.go index 142780718b528d92aa1e989d6be1b76791631412..3b116ca19f5e7012a07e8943a207f57489bd39b1 100644 --- a/test/nilptr5_aix.go +++ b/test/nilptr5_aix.go @@ -1,6 +1,6 @@ // errorcheck -0 -d=nil -// +build aix +//go:build aix // Copyright 2018 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/nilptr5_wasm.go b/test/nilptr5_wasm.go index 6ef8a02e908203bdf64994c256fe342866dda892..ea380d1384f70203e40241ab4fafb65cf2b009e5 100644 --- a/test/nilptr5_wasm.go +++ b/test/nilptr5_wasm.go @@ -1,6 +1,6 @@ // errorcheck -0 -d=nil -// +build wasm +//go:build wasm // Copyright 2018 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/nilptr_aix.go b/test/nilptr_aix.go index ea5fcc3f4e823b9814cad2c598fafdf7115db290..f7a7e616d159bfc3e58c4166dedfa40dfe280547 100644 --- a/test/nilptr_aix.go +++ b/test/nilptr_aix.go @@ -7,7 +7,7 @@ // Test that the implementation catches nil ptr indirection // in a large address space. -// +build aix +//go:build aix package main diff --git a/test/nosplit.go b/test/nosplit.go index 2b1bb5492db64b115e686055aa76eed77932ce0a..e171d1da6618ec649274f36d5fed8d76ebb4a38f 100644 --- a/test/nosplit.go +++ b/test/nosplit.go @@ -1,6 +1,7 @@ -// +build !nacl,!js,!aix,!wasip1,!gcflags_noopt,gc // run +//go:build !nacl && !js && !aix && !wasip1 && !gcflags_noopt && gc + // Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/test/opt_branchlikely.go b/test/opt_branchlikely.go index 884c34916e90574ece4048fc6cc3ad4ffba9b933..0aee33f87a578bc8a56c6d3954baf39af81e2958 100644 --- a/test/opt_branchlikely.go +++ b/test/opt_branchlikely.go @@ -1,7 +1,8 @@ -// +build amd64 // errorcheck -0 -d=ssa/likelyadjust/debug=1,ssa/insert_resched_checks/off // rescheduling check insertion is turned off because the inserted conditional branches perturb the errorcheck +//go:build amd64 + // Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/test/phiopt.go b/test/phiopt.go index e04373eb72371e7979707fd2cc1629a8a177c762..9e21bfdba55aeab33ecf4d943043ff5485164861 100644 --- a/test/phiopt.go +++ b/test/phiopt.go @@ -1,6 +1,7 @@ -// +build amd64 s390x arm64 // errorcheck -0 -d=ssa/phiopt/debug=3 +//go:build amd64 || s390x || arm64 + // Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/test/prove.go b/test/prove.go index 91d1f555191b86cb708675c08028cff41022e7e7..1aea2822912c2726625b247d531a4dd52dd550a2 100644 --- a/test/prove.go +++ b/test/prove.go @@ -1,7 +1,6 @@ // errorcheck -0 -d=ssa/prove/debug=1 //go:build amd64 -// +build amd64 // Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/prove_constant_folding.go b/test/prove_constant_folding.go index d4bdb20d83a564fb903809ef0916ff6aee576ccc..ed63e6851c264bbfc71b53d3cd8746f832e89ee5 100644 --- a/test/prove_constant_folding.go +++ b/test/prove_constant_folding.go @@ -1,6 +1,7 @@ -// +build amd64 // errorcheck -0 -d=ssa/prove/debug=2 +//go:build amd64 + // Copyright 2022 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/test/prove_invert_loop_with_unused_iterators.go b/test/prove_invert_loop_with_unused_iterators.go index f278e5aee0160238d2fbafc20fa82145e5ec2837..c66f20b6e93cbd54fd4019106d1779fbc000fc5a 100644 --- a/test/prove_invert_loop_with_unused_iterators.go +++ b/test/prove_invert_loop_with_unused_iterators.go @@ -1,6 +1,7 @@ -// +build amd64 // errorcheck -0 -d=ssa/prove/debug=1 +//go:build amd64 + package main func invert(b func(), n int) { diff --git a/test/recover4.go b/test/recover4.go index 7cab15a5a814dc8910708525a37933e8b33f82bf..19b94948b8ce1499df535bbd2e59b9b1a64adb4f 100644 --- a/test/recover4.go +++ b/test/recover4.go @@ -1,6 +1,7 @@ -// +build linux darwin // run +//go:build linux || darwin + // Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/test/sigchld.go b/test/sigchld.go index fc6cf91b5790fcdf78735f3d08d3824bbe3c1c69..ad5b18e64d896b32eed76afd6c791a5372a88d50 100644 --- a/test/sigchld.go +++ b/test/sigchld.go @@ -1,6 +1,7 @@ -// +build !plan9,!windows,!wasip1 // run +//go:build !plan9 && !windows && !wasip1 + // Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/test/typeparam/issue54765.go b/test/typeparam/issue54765.go index 364567d258a6ea83f5c7a403e0af8b8833223085..69a0d3746d9651da07a2fe38f78e55889d18f99a 100644 --- a/test/typeparam/issue54765.go +++ b/test/typeparam/issue54765.go @@ -8,7 +8,6 @@ // arguments. (pointer-to-nih types are okay though.) //go:build cgo -// +build cgo package p