From 9a4f923cb8794a81075f88dad401136cee5c1eae Mon Sep 17 00:00:00 2001 From: ian Date: Mon, 14 Oct 2013 21:24:30 +0000 Subject: Update Go testsuite to a copy of the Go 1.1.2 testsuite. * go.test/go-test.exp (go-find-packages): New proc. (go-gc-tests): Skip stress and safe tests. Skip *.dir subdirectories. Do simple +build line matching. Handle run with arguments. Handle errorcheckdir and rundircmpout. Use packages for rundir. Remove special handling for bug191 and dwarf. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203578 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/go.test/test/blank.go | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'gcc/testsuite/go.test/test/blank.go') diff --git a/gcc/testsuite/go.test/test/blank.go b/gcc/testsuite/go.test/test/blank.go index ee618b14858..7f7d9f6f7fb 100644 --- a/gcc/testsuite/go.test/test/blank.go +++ b/gcc/testsuite/go.test/test/blank.go @@ -8,6 +8,11 @@ package main +import ( + "os" + "unsafe" +) + import _ "fmt" var call string @@ -102,8 +107,19 @@ func main() { panic(sum) } + // exp/ssa/interp doesn't yet skip blank fields in struct + // equivalence. It also cannot support unsafe.Pointer. + if os.Getenv("GOSSAINTERP") == "" { + type T1 struct{ x, y, z int } + t1 := *(*T)(unsafe.Pointer(&T1{1, 2, 3})) + t2 := *(*T)(unsafe.Pointer(&T1{4, 5, 6})) + if t1 != t2 { + panic("T{} != T{}") + } + } + h(a, b) - + m() } @@ -133,14 +149,13 @@ func fp1(x, y int) { } } - func m() { var i I - + i = TI{} i.M(1, 1) i.M(2, 2) - + fp(1, 1) fp(2, 2) } @@ -162,4 +177,3 @@ func _() { func ff() { var _ int = 1 } - -- cgit v1.2.1