diff mbox

Go testsuite patch committed: Handle PowerPC

Message ID mcrzka66tq5.fsf@dhcp-172-18-216-180.mtv.corp.google.com
State New
Headers show

Commit Message

Ian Lance Taylor April 20, 2012, 8:20 p.m. UTC
This patch to the Go testsuite driver recognizes PowerPC as a Go
architecture, and disables the nilptr.go test on PowerPC.  The nilptr.go
test is only valid if values are allocated in relatively low memory,
which does not happen on PowerPC.  Ran Go testsuite on
x86_64-unknown-linux-gnu and powerpc64-unknown-linux-gnu.  Committed to
mainline and 4.7 branch.

Ian


2012-04-20  Ian Lance Taylor  <iant@google.com>

	* go.test/go-test.exp (go-set-goarch): Recognize powerpc*-*-*.
	(go-gc-tests): Skip nilptr.go on powerpc*-*-*.
diff mbox

Patch

Index: gcc/testsuite/go.test/go-test.exp
===================================================================
--- gcc/testsuite/go.test/go-test.exp	(revision 186641)
+++ gcc/testsuite/go.test/go-test.exp	(working copy)
@@ -217,6 +217,13 @@  proc go-set-goarch { } {
 		return ""
 	    }
 	}
+	"powerpc*-*-*" {
+	    if [check_effective_target_ilp32] {
+		set goarch "ppc"
+	    } else {
+		set goarch "ppc64"
+	    }
+	}
 	"sparc*-*-*" {
 	    if [check_effective_target_ilp32] {
 		set goarch "sparc"
@@ -302,7 +309,7 @@  proc go-gc-tests { } {
 	}
 
 	# Handle certain tests in a target-dependant way.
-	if { [istarget "alpha*-*-*"] || [istarget "sparc*-*-solaris*"] } {
+	if { [istarget "alpha*-*-*"] || [istarget "sparc*-*-solaris*"] || [istarget "powerpc*-*-*"] } {
 	    if { [string match "*go.test/test/nilptr.go" $test] } {
 		untested $test
 		continue