1
0
mirror of https://github.com/golang/go synced 2024-11-13 18:20:32 -07:00

misc/cgo/test: disable Test10303 for gccgo

When using gccgo it's OK if a pointer passed to C remains on the stack.
Gccgo does not have the clear distinction between C and Go stacks.

Change-Id: I3af9dd6fe078214ab16d9d8dad2d206608d7891d
Reviewed-on: https://go-review.googlesource.com/16774
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Minux Ma <minux@golang.org>
This commit is contained in:
Ian Lance Taylor 2015-11-10 10:39:38 -08:00
parent 9dcc58c3d1
commit d841860f43

View File

@ -6,6 +6,8 @@
package cgotest package cgotest
import "runtime"
/* /*
typedef int *intptr; typedef int *intptr;
@ -39,6 +41,10 @@ import (
) )
func test10303(t *testing.T, n int) { func test10303(t *testing.T, n int) {
if runtime.Compiler == "gccgo" {
t.Skip("gccgo permits C pointers on the stack")
}
// Run at a few different stack depths just to avoid an unlucky pass // Run at a few different stack depths just to avoid an unlucky pass
// due to variables ending up on different pages. // due to variables ending up on different pages.
if n > 0 { if n > 0 {