diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2017-02-17 15:43:39 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2017-02-17 15:43:39 +0000 |
commit | 00b2a30fd4df92fe5ea879295d65c55bf1725fcb (patch) | |
tree | 01db6511f47b5c9c301fa6f57b0df9376c364fd5 /libgo/runtime/go-unsafe-pointer.c | |
parent | 4bcd6597a33c86615059873504b3140f49c3b96c (diff) | |
download | gcc-00b2a30fd4df92fe5ea879295d65c55bf1725fcb.zip gcc-00b2a30fd4df92fe5ea879295d65c55bf1725fcb.tar.gz gcc-00b2a30fd4df92fe5ea879295d65c55bf1725fcb.tar.bz2 |
libgo: update to final Go 1.8 release
Along with the update this fixes a problem that was always present but
only showed up with the new reflect test. When a program used a
**unsafe.Pointer and stored the value in an interface type, the
generated type descriptor pointed to the GC data for *unsafe.Pointer.
It did that by name, but we were not generating a variable with the
right name.
Reviewed-on: https://go-review.googlesource.com/37144
From-SVN: r245535
Diffstat (limited to 'libgo/runtime/go-unsafe-pointer.c')
-rw-r--r-- | libgo/runtime/go-unsafe-pointer.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libgo/runtime/go-unsafe-pointer.c b/libgo/runtime/go-unsafe-pointer.c index cce2e95a..3a97ee1 100644 --- a/libgo/runtime/go-unsafe-pointer.c +++ b/libgo/runtime/go-unsafe-pointer.c @@ -85,6 +85,12 @@ static const String preflection_string = sizeof PREFLECTION - 1, }; +extern const uintptr pointer_unsafe_Pointer_gc[] + __asm__ (GOSYM_PREFIX "__go_td_pN14_unsafe.Pointer$gc"); + +const uintptr pointer_unsafe_Pointer_gc[] __attribute__((aligned(4))) = + {sizeof(void*), GC_APTR, 0, GC_END}; + const struct __go_ptr_type pointer_unsafe_Pointer = { /* __common */ @@ -104,7 +110,7 @@ const struct __go_ptr_type pointer_unsafe_Pointer = /* __equalfn */ &runtime_pointerequal_descriptor, /* __gc */ - unsafe_Pointer_gc, + pointer_unsafe_Pointer_gc, /* __reflection */ &preflection_string, /* __uncommon */ |