1
0
mirror of https://github.com/golang/go synced 2024-11-26 19:41:19 -07:00

test: adjust issue4618 for gccgo allocation behaviour

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/41550044
This commit is contained in:
Ian Lance Taylor 2013-12-12 17:14:05 -08:00
parent 3ddd2eaebc
commit bbf762582f

View File

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