Bug 4550

Summary: Pizza doesn't like Double.NaN on Alpha DP264.
Product: [Retired] Red Hat Linux Reporter: niles
Component: kaffeAssignee: David Lawrence <dkl>
Status: CLOSED DEFERRED QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0   
Target Milestone: ---   
Target Release: ---   
Hardware: alpha   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 1999-08-18 21:26:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description niles 1999-08-16 18:18:16 UTC
Check out this java class:

----------
class Data { double doubleVal = Double.NaN; }
----------

Attempting to compile this java code with Kaffe's javac
(pizza) will
result in the following ArithmeticException on my brand new
Linux/Alpha DP264:
=======================================================

An exception has occurred in the compiler. (v0.39g)
Please file a bug report by sending your program and the
following diagnostic topizza.edu.au.

   Thank you.

java.lang.ArithmeticException
	at pizza.v39.DoubleConst.hashCode(consttypes.pizza:220)
	at pizza.v39.Pool.put(bytecode.pizza:209)
	at pizza.v39.Gen.putConstant(gen.pizza:510)
	at pizza.v39.ImmediateItem.ldc(items.pizza:381)
	at pizza.v39.ImmediateItem.load(items.pizza:427)
	at pizza.v39.ByteCodeGen.genExpr(bytecodegen.pizza:992)
	at pizza.v39.ByteCodeGen.genStat(bytecodegen.pizza:517)
	at pizza.v39.ByteCodeGen.genStats(bytecodegen.pizza:745)
	at pizza.v39.ByteCodeGen.genTry(bytecodegen.pizza:236)
	at pizza.v39.ByteCodeGen.genDef(bytecodegen.pizza:294)
	at pizza.v39.ByteCodeGen.genDef(bytecodegen.pizza:287)
	at pizza.v39.ByteCodeGen.generate(bytecodegen.pizza:270)
	at pizza.v39.Main.process(main.pizza:236)
	at pizza.v39.Main.compile(main.pizza:298)
	at pizza.v39.Main.main(main.pizza:372)
	at pizza.compiler.Main.main(Main.pizza:20)
=======================================================

I bet this is a problem with Kaffe and not pizza itself, but
perhaps you can help me debug this....
(P.S. I've sent a copy of this to pizza bug mailing list)

Comment 1 Bill Nottingham 1999-08-16 22:36:59 UTC
FWIW, it works OK with the latest kaffe CVS snapshots...

Comment 2 Bill Nottingham 1999-08-18 21:26:59 UTC
since it is fixed in the kaffe CVS, we will provide a fix
when the next offcial kaffe release is made.