mirror of
https://github.com/golang/go
synced 2024-11-26 17:07:09 -07:00
b5b2cf519f
Since when go/types,types2 do not know about build constraints, and runtime/cgo.Incomplete is only available on platforms that support cgo. These tests are also failing on aix with failure from linker, so disable them on aix to make builder green. The fix for aix is tracked in #54814 Updates #46731 Updates #54814 Change-Id: I5d6f6e29a8196efc6c457ea64525350fc6b20309 Reviewed-on: https://go-review.googlesource.com/c/go/+/427394 Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Bryan Mills <bcmills@google.com> Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
32 lines
440 B
Go
32 lines
440 B
Go
// run
|
|
|
|
// 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.
|
|
|
|
//go:build cgo && !aix
|
|
|
|
package main
|
|
|
|
import "runtime/cgo"
|
|
|
|
type NIH struct {
|
|
_ cgo.Incomplete
|
|
}
|
|
|
|
type T struct {
|
|
x *NIH
|
|
p *int
|
|
}
|
|
|
|
var y NIH
|
|
var z int
|
|
|
|
func main() {
|
|
a := []T{{&y, &z}}
|
|
a = append(a, T{&y, &z})
|
|
if a[1].x == nil {
|
|
panic("pointer not written")
|
|
}
|
|
}
|