It looks to me like the Java source compiler is miscompiling your test case. java.lang.Double looks fine. The first thing I'd try is recompiling gcj with no optimizations. Go into gcc/gcc and do make clean; make; make install. Andrew.