diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-05-20 00:18:15 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-05-20 00:18:15 +0000 |
commit | 84911de8492fb75007eec6bfa4abb7905439f93c (patch) | |
tree | c891bdec1e6f073f73fedeef23718bc3ac30d499 /libgo/runtime/go-unsafe-newarray.c | |
parent | ad33e6a8510b48571eaef50af339892925108830 (diff) | |
download | gcc-84911de8492fb75007eec6bfa4abb7905439f93c.tar.gz |
Update to current version of Go library.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173931 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo/runtime/go-unsafe-newarray.c')
-rw-r--r-- | libgo/runtime/go-unsafe-newarray.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libgo/runtime/go-unsafe-newarray.c b/libgo/runtime/go-unsafe-newarray.c index 3bea2829f78..5fd81ce2733 100644 --- a/libgo/runtime/go-unsafe-newarray.c +++ b/libgo/runtime/go-unsafe-newarray.c @@ -5,6 +5,7 @@ license that can be found in the LICENSE file. */ #include "go-alloc.h" +#include "go-panic.h" #include "go-type.h" #include "interface.h" @@ -21,6 +22,9 @@ NewArray (struct __go_empty_interface type, int n) { const struct __go_type_descriptor *descriptor; + if (((uintptr_t) type.__type_descriptor & reflectFlags) != 0) + __go_panic_msg ("invalid interface value"); + /* FIXME: We should check __type_descriptor to verify that this is really a type descriptor. */ descriptor = (const struct __go_type_descriptor *) type.__object; |