This is the mail archive of the
java-discuss@sourceware.cygnus.com
mailing list for the Java project.
Re: Bug with arrays or type conversion?
- To: Matt Welsh <mdw at cs dot berkeley dot edu>, java-discuss at sourceware dot cygnus dot com
- Subject: Re: Bug with arrays or type conversion?
- From: Bryce McKinlay <bryce at albatross dot co dot nz>
- Date: Mon, 22 Nov 1999 16:40:13 +1300
- References: <199911220312.TAA29025@mnemosyne.CS.Berkeley.EDU>
Matt Welsh wrote:
> I am running gcj with the -O2 option and am running into what seems to be
> a bug with arrays or type conversion. Basically I have a routine which takes
> a 'short' and sticks each byte of the short into a byte array (it's part of
> a hand-coded serialization routine).
>
> I have reduced the problem to a very simple test case. The program simply
> calls the routine "put_short" to write the values 0 ... 50 into an array
> of 100 bytes. It then prints out the contents of the byte array.
What version of gcc are you using? Using 2.95.2 it works fine for me with -O2 or -O3. I suspect its a generic or back-end optimization bug in the particular snapshor you're using.
regards
[ bryce ]