From d841860f43ded5b1f3663d2d5fe9034c65ee7b6b Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Tue, 10 Nov 2015 10:39:38 -0800 Subject: [PATCH] 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 TryBot-Result: Gobot Gobot Reviewed-by: Minux Ma --- misc/cgo/test/issue10303.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/misc/cgo/test/issue10303.go b/misc/cgo/test/issue10303.go index ea623d7379..dd19dfbb01 100644 --- a/misc/cgo/test/issue10303.go +++ b/misc/cgo/test/issue10303.go @@ -6,6 +6,8 @@ package cgotest +import "runtime" + /* typedef int *intptr; @@ -39,6 +41,10 @@ import ( ) 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 // due to variables ending up on different pages. if n > 0 { -- 2.48.1