mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 11:04:34 +02:00
8029366: ShouldNotReachHere error when creating an array with component type of void
Reviewed-by: kvn
This commit is contained in:
parent
f3fc753f26
commit
e71c8df213
2 changed files with 49 additions and 0 deletions
|
@ -2071,6 +2071,11 @@ const Type *LoadNode::klass_value_common( PhaseTransform *phase ) const {
|
|||
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()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue