summaryrefslogtreecommitdiff
path: root/test/fixedbugs/issue4618.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/fixedbugs/issue4618.go')
-rw-r--r--test/fixedbugs/issue4618.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/fixedbugs/issue4618.go b/test/fixedbugs/issue4618.go
index 335feaadb..fe875b350 100644
--- a/test/fixedbugs/issue4618.go
+++ b/test/fixedbugs/issue4618.go
@@ -9,6 +9,7 @@ package main
import (
"fmt"
"os"
+ "runtime"
"testing"
)
@@ -29,11 +30,11 @@ func G() {
func main() {
nf := testing.AllocsPerRun(100, F)
ng := testing.AllocsPerRun(100, G)
- if int(nf) != 1 {
+ if int(nf) > 1 {
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)
}