This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Is this a bug?


On Mon, Sep 09, 2002 at 03:05:02PM -0600, tromey@redhat.com wrote:
> >>>>> "Martin" == Martin Kahlert <martin.kahlert@infineon.com> writes:
> 
> >> I think this was fixed by this patch:
> >> [ omitted ]
> 
> Martin> Do you use the mainline? The hex bug happens with
> Martin> the snapshot 20020902 (and gcc-3.2 release).
> Martin> gcj -v says: gcc version 3.2.1 20020902 (prerelease)

Is it possible that this fix is only half of the truth?
Test this example:

public class hello
{
    final static long a = 1000000000000L;

    public static void main(String[] args)
    {
        long x = 1L;
        int i;

        for(i=0;i<12;i++)
            x *= 10L;
        System.out.println("a = " + a);
        System.out.println("x = " + x);
    }
}

With gcc version 3.2.1 20020902 (prerelease) it prints
on Linux
a = 0xe8d4a51000
x = 1000000000000

The difference is that the 'a = ' string is filled at compile time,
the other one at runtime. (gcj -S told me that).

I will try it with the 20020909 snapshot which is made from HEAD as 
indicated by the announcement.

Thanks for your help
Martin.

-- 
The early bird catches the worm. If you want something else for       
breakfast, get up later.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]