diff options
author | mrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-10-20 23:47:35 +0000 |
---|---|---|
committer | mrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-10-20 23:47:35 +0000 |
commit | 6b40961666f073231ed8a76e6e33deeda063cde7 (patch) | |
tree | 8247eb4232e8be98b7f61bd68bab2fd1a9f06ca3 /gcc/testsuite/go.test/test/blank.go | |
parent | e6b1b76450af5f98696ecedd4bd9a0ed18cdb2a6 (diff) | |
parent | fc1ce0cf396bf638746d546a557158d87f13849b (diff) | |
download | gcc-6b40961666f073231ed8a76e6e33deeda063cde7.tar.gz |
Merge in trunk.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/wide-int@203881 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/go.test/test/blank.go')
-rw-r--r-- | gcc/testsuite/go.test/test/blank.go | 24 |
1 files changed, 19 insertions, 5 deletions
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 } - |