]> Cypherpunks repositories - gostls13.git/commitdiff
test: adjust issue4618 for gccgo allocation behaviour
authorIan Lance Taylor <iant@golang.org>
Fri, 13 Dec 2013 01:14:05 +0000 (17:14 -0800)
committerIan Lance Taylor <iant@golang.org>
Fri, 13 Dec 2013 01:14:05 +0000 (17:14 -0800)
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/41550044

test/fixedbugs/issue4618.go

index 335feaadb065c3b8ca0429be0eced3ee9bba0e48..ff91ae70673afae7cb82f94d6afb7456bda8475d 100644 (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)
        }