aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/go/gofrontend/MERGE2
-rw-r--r--libgo/go/runtime/ffi.go6
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE
index 4a81caa..4b7a4b3 100644
--- a/gcc/go/gofrontend/MERGE
+++ b/gcc/go/gofrontend/MERGE
@@ -1,4 +1,4 @@
-7aabaf8623cf88e2378057476a034093abbe5aab
+09ca3c1ea8a52b5d3d6c4331c59d44e0b6bfab57
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
diff --git a/libgo/go/runtime/ffi.go b/libgo/go/runtime/ffi.go
index be79224..cd8479e 100644
--- a/libgo/go/runtime/ffi.go
+++ b/libgo/go/runtime/ffi.go
@@ -224,6 +224,9 @@ func structToFFI(typ *structtype) *__ffi_type {
if c == 0 {
return emptyStructToFFI()
}
+ if typ.typ.kind&kindDirectIface != 0 {
+ return ffi_type_pointer()
+ }
fields := make([]*__ffi_type, 0, c+1)
checkPad := false
@@ -307,6 +310,9 @@ func arrayToFFI(typ *arraytype) *__ffi_type {
if typ.len == 0 {
return emptyStructToFFI()
}
+ if typ.typ.kind&kindDirectIface != 0 {
+ return ffi_type_pointer()
+ }
elements := make([]*__ffi_type, typ.len+1)
et := typeToFFI(typ.elem)
for i := uintptr(0); i < typ.len; i++ {