Commit bbf76258 authored by Ian Lance Taylor's avatar Ian Lance Taylor

test: adjust issue4618 for gccgo allocation behaviour

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/41550044
parent 3ddd2eae
...@@ -9,6 +9,7 @@ package main ...@@ -9,6 +9,7 @@ package main
import ( import (
"fmt" "fmt"
"os" "os"
"runtime"
"testing" "testing"
) )
...@@ -33,7 +34,7 @@ func main() { ...@@ -33,7 +34,7 @@ func main() {
fmt.Printf("AllocsPerRun(100, F) = %v, want 1\n", nf) fmt.Printf("AllocsPerRun(100, F) = %v, want 1\n", nf)
os.Exit(1) 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) fmt.Printf("AllocsPerRun(100, G) = %v, want 0\n", ng)
os.Exit(1) os.Exit(1)
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment