This is the mail archive of the java-discuss@sourceware.cygnus.com 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]

Re: Bug with arrays or type conversion?


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 ]



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