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

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


--0-2015116133-1056746923=:24365
Content-Type: text/plain; charset=us-ascii
Content-Id: 
Content-Disposition: inline

--- Marc Kleine-Budde <kleine-budde@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
--0-2015116133-1056746923=:24365
Content-Type: application/octet-stream; name="powerpc-linux-divtest.diff"
Content-Transfer-Encoding: base64
Content-Description: powerpc-linux-divtest.diff
Content-Disposition: attachment; filename="powerpc-linux-divtest.diff"

T25seSBpbiBrYWZmZTogYXV0b200dGUuY2FjaGUKZGlmZiAtdXIgL2hvbWUv
dG9waWMvQ1ZTL2thZmZlL2NvbmZpZ3VyZSBrYWZmZS9jb25maWd1cmUKLS0t
IC9ob21lL3RvcGljL0NWUy9rYWZmZS9jb25maWd1cmUJMjAwMy0wNi0yNiAw
NzozMzo0Ni4wMDAwMDAwMDAgLTA0MDAKKysrIGthZmZlL2NvbmZpZ3VyZQky
MDAzLTA2LTI3IDE3OjM2OjAyLjAwMDAwMDAwMCAtMDQwMApAQCAtMzg5OTEs
MTIgKzM4OTkxLDEzIEBACiAvKiBlbmQgY29uZmRlZnMuaC4gICovCiAKICNp
bmNsdWRlIDxsaW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