Mercurial > hg > truffle
diff src/share/vm/opto/memnode.cpp @ 14213:6c4c27c5cc9a
8029366: ShouldNotReachHere error when creating an array with component type of void
Reviewed-by: kvn
author | twisti |
---|---|
date | Fri, 06 Dec 2013 16:43:56 -0800 |
parents | 884ed7a10f09 |
children | de6a9e811145 5da8bb64b370 |
line wrap: on
line diff
--- a/src/share/vm/opto/memnode.cpp Fri Dec 06 12:11:51 2013 -0800 +++ b/src/share/vm/opto/memnode.cpp Fri Dec 06 16:43:56 2013 -0800 @@ -2071,6 +2071,11 @@ if (t != NULL) { // constant oop => constant klass if (offset == java_lang_Class::array_klass_offset_in_bytes()) { + if (t->is_void()) { + // We cannot create a void array. Since void is a primitive type return null + // klass. Users of this result need to do a null check on the returned klass. + return TypePtr::NULL_PTR; + } return TypeKlassPtr::make(ciArrayKlass::make(t)); } if (!t->is_klass()) {