This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [Java] Call "fold" in convert_ieee_real_to_integer
- From: Ranjit Mathew <rmathew at gmail dot com>
- To: Roger Sayle <roger at eyesopen dot com>
- Cc: java-patches at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Thu, 22 Jul 2004 14:47:50 +0530
- Subject: Re: [Java] Call "fold" in convert_ieee_real_to_integer
- References: <Pine.LNX.4.44.0407211514570.24992-100000@www.eyesopen.com>
On Wed, 21 Jul 2004 15:23:06 -0600 (MDT), Roger Sayle
<roger@eyesopen.com> wrote:
>
> On Wed, 21 Jul 2004, Ranjit Mathew wrote:
> > No, "case (int)Float.NaN:" also doesn't work.
>
> Hi Ranjit,
>
> Could you check whether the patch below cures the recent JACKS
> failures (and "case (int)Float.Nan") for you?
>
> This following patch has been tested on i686-pc-linux-gnu, with a full
> "make bootstrap", all default languages including java, and regression
> tested with a top-level "make -k check" with no new failures.
>
> Ok for mainline if this fixes Ranjit's problems?
Thanks a tonne for looking into this Roger!
Unfortunately, there still is some problem and
quite curiously, the behaviour is different for "-C"
(generate Java bytecode) and "-fsyntax-only"
and "-c" (generate object code) as can be
seen from the following:
---------------- 8< ----------------
~/tmp > cat X.java
public class X
{
public void foo( int i)
{
switch(i)
{
case ((int )Float.NaN == 0 ? 1 : 0): break;
case (int )Float.NaN: break;
}
}
}
~/tmp > $MYGCJ -fsyntax-only X.java
~/tmp > $MYGCJ -c X.java
~/tmp > $MYGCJ -C X.java
X.java: In class `X':
X.java: In method `X.foo(int)':
X.java:8: error: duplicate case label: `0'.
case (int )Float.NaN: break;
^
X.java:7: error: original label is here.
case ((int )Float.NaN == 0 ? 1 : 0): break;
^
2 errors
~/tmp >
---------------- 8< ----------------
Thanks,
Ranjit.
--
Ranjit Mathew Email: rmathew AT gmail DOT com
Bangalore, INDIA. Web: http://ranjitmathew.tripod.com/