mirror of
https://github.com/golang/go
synced 2024-11-27 03:41:22 -07:00
a9c75ecd3d
In the rare case when a cgo type makes it into an object file, we need the go:notinheap annotation to go with it. Fixes #41761 Change-Id: I541500cb1a03de954881aef659f96fc0b7738848 Reviewed-on: https://go-review.googlesource.com/c/go/+/259297 Trust: Keith Randall <khr@golang.org> Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
21 lines
342 B
Go
21 lines
342 B
Go
// 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.
|
|
|
|
package cgotest
|
|
|
|
/*
|
|
typedef struct S S;
|
|
*/
|
|
import "C"
|
|
|
|
import (
|
|
"cgotest/issue41761a"
|
|
"testing"
|
|
)
|
|
|
|
func test41761(t *testing.T) {
|
|
var x issue41761a.T
|
|
_ = (*C.struct_S)(x.X)
|
|
}
|