New Jacks Regressions: Constant Folding of Casts
Roger Sayle
roger@eyesopen.com
Wed Jul 21 13:54:00 GMT 2004
On 2004年7月21日, Ranjit Mathew wrote:
> No, "case (int )Float.NaN:" also doesn't work.
>> The Java front end does call fold() on case nodes.
> Has this become invalid now?
Thanks. The bug is in java/typeck.c's convert_ieee_real_to_integer.
This routine builds the COND_EXPRs and relational tests that implement
java's semantics of truncating out-of-range floating point values to
zero.
Unfortunately, none of the six calls to build2/build3 are immediately
followed by a call to "fold". I suspect that unrelated changes have
exposed this latent problem, as the code in convert_ieee_real_to_integer
has failed to call fold since atleast gcc 3.2.
I'll prepare and test a patch, unless someone beats me to it.
Roger
--
More information about the Java
mailing list