[kaffe] [Bug Report] Problem compiling 1.1.0 with GCC 3.3 on GNU/Linux PowerPC, and 1 test failed

Dalibor Topic robilad at yahoo.com
Fri Jun 27 13:46:01 PDT 2003


--- Marc Kleine-Budde <kleine-budde at gmx.de> wrote:
> On Fri, Jun 27, 2003 at 10:01:49AM -0700, Dalibor Topic wrote:
> > it seems that divjava fails because long remainder is broken on
> powerpc-linux.
> > Could you try out the following C program, and report back what it prints
> out:

#include <stdio.h>
#include <limits.h>
#define T long
#ifndef LONG_MIN
# define LONG_MIN ((((unsigned T)(~(T)0))>>1)+1)
#endif
T foo(T i, T j);
int main() { 
T tmp = foo(LONG_MIN, -1l); 
printf ("%ld\n", tmp);
return
0;}
T foo(T i, T j) { return i % j; }


since I'm curious what exactly is returned by powerpc-linux. -1 I assume.

In any case, does the attached patch fix the issue?

cheers,
dalibor topic

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: powerpc-linux-divtest.diff
Type: application/octet-stream
Size: 2484 bytes
Desc: powerpc-linux-divtest.diff
Url : http://kaffe.org/pipermail/kaffe/attachments/20030627/364af6e4/attachment-0002.obj 


More information about the kaffe mailing list