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: Fwd: Re: possible runtime class intialization error


> Sorry, I ran with gij and got the same result.  All that means is that
> it is a compiler bug.

Yes. Definitely a compiler stuff. If you say: "it is a bug" I will report it. That is what I want to hear ;-)

 
> Interestingly, the bug doesn't occur with `gcj -C'.  It only occurs
> when generating object code.  Compiling from .class files also gets
> the correct result.

Moreover - even when I compile without -C into binary and there IS compiled .class (even that I reference to .java) it works. It uses .class instead? I think compile from source (.java) _should be_ preffered because should result to more efficient code! [see example in the bottom]

> I looked at the code a bit.  It looks like another bug in computing
> constant expressions.  This is an area we aren't very strong on right
> now :-(
> 
> If you're up for debugging you could try writing a smaller example
> (shouldn't be too hard) and then tracking through
> fold_constant_for_init.

I could but not just now. I'm finishing project and from 18th I should be free to POI/gcj projects. But I already tried to get smaller example and failed. I have to try it again.
 
> Tom

Regards and THANKS,
Martin

An example:
[alik@explorer gg]$ gcj --main=org.apache.poi.poifs.dev.POIFSViewer `cat list`
[alik@explorer gg]$ ./a.out abc.doc 
.-------.
|abc.doc|
.-------.
POIFS const 0
POIFS const 1 0
Invalid header signature; read 2763311526040853058, expected -2226271756974174256
[alik@explorer gg]$ javac @list       
[alik@explorer gg]$ gcj --main=org.apache.poi.poifs.dev.POIFSViewer `cat list`
[alik@explorer gg]$ ./a.out abc.doc 
.-------.
|abc.doc|
.-------.
POIFS const 0
POIFS const 1 109
Invalid header signature; read 2763311526040853058, expected -2226271756974174256
[alik@explorer gg]$ 
[alik@explorer gg]$ gcj --version
gcj (GCC) 3.2
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[alik@explorer gg]$ java -version
java version "1.4.1_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-b01)
Java HotSpot(TM) Client VM (build 1.4.1_01-b01, mixed mode)
[alik@explorer gg]$ 




______________________________________________________________________________
http://www.zdravazena.cz - Zvětšení a zpevnění poprsí přírodní cestou bez vedlejších účinků. Nastolení hormonální rovnováhy - odstranění problémů spojených s pms a klimakteriem.


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