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) }