From bbf762582fd7f45ac5e145021d3f5bed2ea481b3 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Thu, 12 Dec 2013 17:14:05 -0800 Subject: [PATCH] test: adjust issue4618 for gccgo allocation behaviour R=golang-dev, rsc CC=golang-dev https://golang.org/cl/41550044 --- test/fixedbugs/issue4618.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/fixedbugs/issue4618.go b/test/fixedbugs/issue4618.go index 335feaadb06..ff91ae70673 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) }