This is the mail archive of the
mailing list for the GCC project.
Re: New Jacks Regressions: Constant Folding of Casts
- From: Roger Sayle <roger at eyesopen dot com>
- To: Ranjit Mathew <rmathew at gmail dot com>
- Cc: java at gcc dot gnu dot org, <gcc at gcc dot gnu dot org>
- Date: Wed, 21 Jul 2004 07:40:44 -0600 (MDT)
- Subject: Re: New Jacks Regressions: Constant Folding of Casts
On Wed, 21 Jul 2004, 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
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.