From: Ian Lance Taylor Date: Fri, 13 Dec 2013 01:14:05 +0000 (-0800) Subject: test: adjust issue4618 for gccgo allocation behaviour X-Git-Tag: go1.3beta1~1249 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=bbf762582fd7f45ac5e145021d3f5bed2ea481b3;p=gostls13.git test: adjust issue4618 for gccgo allocation behaviour R=golang-dev, rsc CC=golang-dev https://golang.org/cl/41550044 --- diff --git a/test/fixedbugs/issue4618.go b/test/fixedbugs/issue4618.go index 335feaadb0..ff91ae7067 100644 --- a/test/fixedbugs/issue4618.go +++ b/test/fixedbugs/issue4618.go @@ -9,6 +9,7 @@ package main import ( "fmt" "os" + "runtime" "testing" ) @@ -33,7 +34,7 @@ func main() { fmt.Printf("AllocsPerRun(100, F) = %v, want 1\n", nf) os.Exit(1) } - if int(ng) != 0 { + if int(ng) != 0 && (runtime.Compiler != "gccgo" || int(ng) != 1) { fmt.Printf("AllocsPerRun(100, G) = %v, want 0\n", ng) os.Exit(1) }