This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: New Jacks Regressions: Constant Folding of Casts
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: Ranjit Mathew <rmathew at gmail dot com>
- Cc: java at gcc dot gnu dot org, gcc at gcc dot gnu dot org
- Date: Tue, 20 Jul 2004 00:41:00 -0700
- Subject: Re: New Jacks Regressions: Constant Folding of Casts
- References: <cdihn5$l58$1@sea.gmane.org>
On Jul 20, 2004, at 12:30 AM, Ranjit Mathew wrote:
Hi,
In the last 24 hours, the following:
case ((int )Float.NaN == 0 ? 1 : 0): break;
now gives an error saying "Constant expression required".
This causes 4 new Jacks failures. (Note that casting NaN
to an int should give the value 0.)
I note that something like "0 == 0 ? 1 : 0" does not
give this error.
I am not able to quickly tell what could be causing
this failure.
Any insights?
Maybe this change has something to do with it:
2004-07-19 Roger Sayle <roger@eyesopen.com>
* fold-const.c (tree_expr_nonzero_p): Add function prototype.
(fold) <EQ_EXPR>: Move tree_expr_nonzero_p optimization from
fold_relational_const to here, i.e. "(x | 5) == 0" -> false.
(fold) (UNEQ_EXPR>: Add optimizations for unordered comparisons
of the form "x op x" where op is UNLE, UNGE, UNEQ or LTGT.
(fold_relational_const): Tidy up handling of floating point
comparisons by calling real_compare. Remove tree_expr_nonzero_p
transformation; fold_relational_const assumes constant operands.
Since that is the only change fold not to fold something.
Thanks,
Andrew Pinski