Compiling /tmp/jprt/P1/B/011046.coleenp/source/src/share/vm/oops/instanceRefKlass.cpp
rm -f instanceRefKlass.o
CC -DSOLARIS -DSPARC_WORKS -DSPARC -DASSERT -DFASTDEBUG
-DCHECK_UNHANDLED_OOPS
-I/tmp/jprt/P1/B/011046.coleenp/source/src/share/vm/prims
-I/tmp/jprt/P1/B/011046.coleenp/source/src/closed/share/vm
-I/tmp/jprt/P1/B/011046.coleenp/source/src/share/vm
-I/tmp/jprt/P1/B/011046.coleenp/source/src/cpu/sparc/vm
-I/tmp/jprt/P1/B/011046.coleenp/source/src/os_cpu/solaris_sparc/vm
-I/tmp/jprt/P1/B/011046.coleenp/source/src/os/solaris/vm
-I/tmp/jprt/P1/B/011046.coleenp/source/src/closed/os/posix/vm
-I/tmp/jprt/P1/B/011046.coleenp/source/src/os/posix/vm -I../generated
-DHOTSPOT_RELEASE_VERSION="\"21.0-b05-internal-201103270110.coleenp.rt_test\""
-DHOTSPOT_BUILD_TARGET="\"fastdebug\"" -DHOTSPOT_BUILD_USER="\"jprtadm\""
-DHOTSPOT_LIB_ARCH=\"sparc\" -DJRE_RELEASE_VERSION="\"1.7.0\""
-DHOTSPOT_VM_DISTRO="\"Java HotSpot(TM)\"" -DTARGET_OS_FAMILY_solaris
-DTARGET_ARCH_sparc -DTARGET_ARCH_MODEL_sparc
-DTARGET_OS_ARCH_solaris_sparc -DTARGET_OS_ARCH_MODEL_solaris_sparc
-DTARGET_COMPILER_sparcWorks -DCOMPILER2 -DCOMPILER1 -DSOLARIS_7_OR_LATER
-DDONT_USE_PRECOMPILED_HEADER -xmemalign=4s -xarch=v8plus
/tmp/jprt/P1/B/011046.coleenp/source/src/os_cpu/solaris_sparc/vm/solaris_sparc.il
-template=no%extdef -features=no%split_init -D_Crun_inline_placement
-library=%none -mt -xO4 -g0 -features=no%except
-I/opt/SUNWdtrd/include -DDTRACE_ENABLED -c -o instanceRefKlass.o
/tmp/jprt/P1/B/011046.coleenp/source/src/share/vm/oops/instanceRefKlass.cpp
"/tmp/jprt/P1/B/011046.coleenp/source/src/share/vm/oops/instanceKlass.cpp",
line 2340: Error: Overloading ambiguity between "klassOop::operator
klassOopDesc*() const" and "oop::operator void*() const".
1 Error(s) detected.
Failure occurs at code added as part of:
7017732: move static fields into Class to prepare for perm gen removal
http://hg.openjdk.java.net/jdk7/hotspot-rt/hotspot/rev/c7f3d0b4570f
Failing code:
2340 if (real_klass && real_klass->klass_part()->oop_is_instance()) {
Likely cause:
real_klass needs to be a pointer-type in the "if" expression. In non-debug it is. In debug it's not and so we need to apply a conversion operator. The compiler is complaining that there are two possible conversion operators that apply.
Suggested fix:
Both cast operators are functionally equivalent so forcing resolution to either should be fine. It should be easier to force (void*) as it doesn't depend on whether it is a fastdebug build or not. So suggested trying:
if ( ((void*)real_klass) && ... )