var concurrentFlagOK = [256]bool{
'B': true, // disabled bounds checking
'C': true, // disable printing of columns in error messages
+ 'e': true, // no limit on errors; errors all come from non-concurrent code
'I': true, // add `directory` to import search path
'N': true, // disable optimizations
'l': true, // disable inlining
--- /dev/null
+// compile -c=4
+
+// 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.
+
+// Issue 20162: embedded interfaces weren't dowidth-ed by the front end,
+// leading to races in the backend.
+
+package p
+
+func Foo() {
+ _ = (make([]func() interface {
+ M(interface{})
+ }, 1))
+}
type runCmd func(...string) ([]byte, error)
-func compileFile(runcmd runCmd, longname string) (out []byte, err error) {
+func compileFile(runcmd runCmd, longname string, flags []string) (out []byte, err error) {
cmd := []string{"go", "tool", "compile", "-e"}
+ cmd = append(cmd, flags...)
if *linkshared {
cmd = append(cmd, "-dynlink", "-installsuffix=dynlink")
}
return
case "compile":
- _, t.err = compileFile(runcmd, long)
+ _, t.err = compileFile(runcmd, long, flags)
case "compiledir":
// Compile all files in the directory in lexicographic order.