]> Cypherpunks repositories - gostls13.git/commitdiff
misc/cgo/test: disable Test10303 for gccgo
authorIan Lance Taylor <iant@golang.org>
Tue, 10 Nov 2015 18:39:38 +0000 (10:39 -0800)
committerIan Lance Taylor <iant@golang.org>
Wed, 11 Nov 2015 01:02:35 +0000 (01:02 +0000)
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>
misc/cgo/test/issue10303.go

index ea623d7379fdac932225fcd15ce688e126535f5f..dd19dfbb01e2daffbe679ffa4be090dfda0340fe 100644 (file)
@@ -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 {