summaryrefslogtreecommitdiff
path: root/libgo/runtime/go-new-map.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2011-06-20 19:52:08 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2011-06-20 19:52:08 +0000
commit34bbbb0670a7df57036c2e158857ef655548bca5 (patch)
treea40370cacb124a35a15e8df7766262292b7f292e /libgo/runtime/go-new-map.c
parentefff306159648aee52fe35120a1ee0270034bda0 (diff)
downloadgcc-34bbbb0670a7df57036c2e158857ef655548bca5.tar.gz
2011-06-20 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 175225 using svnmerge. Using c_register_pragma_with_expansion_and_data is now possible... git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@175227 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo/runtime/go-new-map.c')
-rw-r--r--libgo/runtime/go-new-map.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libgo/runtime/go-new-map.c b/libgo/runtime/go-new-map.c
index 3a471299b22..05ac8a1a40c 100644
--- a/libgo/runtime/go-new-map.c
+++ b/libgo/runtime/go-new-map.c
@@ -106,9 +106,11 @@ __go_map_next_prime (uintptr_t n)
struct __go_map *
__go_new_map (const struct __go_map_descriptor *descriptor, uintptr_t entries)
{
+ int ientries;
struct __go_map *ret;
- if ((uintptr_t) (int) entries != entries)
+ ientries = (int) entries;
+ if (ientries < 0 || (uintptr_t) ientries != entries)
__go_panic_msg ("map size out of range");
if (entries == 0)