The log is:
KIND=cast DO_CASTS=true N=100000
Exception in thread "main" java.lang.ClassCastException: required class java.lang.Float but encountered class java.lang.Boolean
at java.lang.invoke.MethodHandleNatives.raiseException(MethodHandleNatives.java:378)
at java.lang.invoke.FromGeneric$A1.invoke_F1(FromGeneric.java:522)
at java.lang.invoke.FilterGeneric$F2.invoke_V1(FilterGeneric.java:537)
at java.lang.invoke.ToGeneric$A1.target(ToGeneric.java:639)
at java.lang.invoke.ToGeneric$A1.targetA1(ToGeneric.java:641)
at java.lang.invoke.ToGeneric$A1.invoke_F(ToGeneric.java:651)
at java.lang.invoke.FromGeneric$A2.invoke_F2(FromGeneric.java:534)
at java.lang.invoke.FilterGeneric$F1.invoke_F1(FilterGeneric.java:517)
at java.lang.invoke.FilterGeneric$F2.invoke_V1(FilterGeneric.java:537)
at java.lang.invoke.ToGeneric$A1.target(ToGeneric.java:639)
at java.lang.invoke.ToGeneric$A1.targetA1(ToGeneric.java:641)
at java.lang.invoke.ToGeneric$A1.invoke_F(ToGeneric.java:651)
at Test6998541.boolean2prim(Test6998541.java:211)
at Test6998541.doboolean(Test6998541.java:67)
at Test6998541.main(Test6998541.java:54)
or
java.lang.ClassCastException: required class java.lang.Float but encountered class java.lang.Boolean
at java.lang.invoke.MethodHandleNatives.raiseException(MethodHandleNatives.java:378)
at java.lang.invoke.FromGeneric$A1.invoke_F1(FromGeneric.java:522)
at java.lang.invoke.FilterGeneric$F2.invoke_V1(FilterGeneric.java:537)
at java.lang.invoke.ToGeneric$A1.target(ToGeneric.java:639)
at java.lang.invoke.ToGeneric$A1.targetA1(ToGeneric.java:641)
at java.lang.invoke.ToGeneric$A1.invoke_F(ToGeneric.java:651)
at java.lang.invoke.FromGeneric$A2.invoke_F2(FromGeneric.java:534)
at java.lang.invoke.FilterGeneric$F1.invoke_F1(FilterGeneric.java:517)
at java.lang.invoke.FilterGeneric$F2.invoke_V1(FilterGeneric.java:537)
at java.lang.invoke.ToGeneric$A1.target(ToGeneric.java:639)
at java.lang.invoke.ToGeneric$A1.targetA1(ToGeneric.java:641)
at java.lang.invoke.ToGeneric$A1.invoke_F(ToGeneric.java:651)
at Test6998541.boolean2prim(Test6998541.java:211)
at Test6998541.doboolean(Test6998541.java:67)
at Test6998541.main(Test6998541.java:54)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:94)
at java.lang.Thread.run(Thread.java:722)
Reproducible on solaris-sparc with VM options '-client -Xcomp -XX:+StartAttachListener -XX:+UseConcMarkSweepGC'.