diff --git a/src/share/vm/opto/type.cpp b/src/share/vm/opto/type.cpp index 28545c6396d95eee72adaf94ac8b75dea7d35d9c..72d52f775e132daeed14d10cdb716e68c82bae70 100644 --- a/src/share/vm/opto/type.cpp +++ b/src/share/vm/opto/type.cpp @@ -3781,7 +3781,7 @@ ciKlass* TypeAryPtr::klass() const { // Oops, need to compute _klass and cache it ciKlass* k_ary = compute_klass(); - if( this != TypeAryPtr::OOPS ) { + if( this != TypeAryPtr::OOPS && this->dual() != TypeAryPtr::OOPS ) { // The _klass field acts as a cache of the underlying // ciKlass for this array type. In order to set the field, // we need to cast away const-ness.