GCJ4 on PPC64: ICE in mark_reference_fields, at java/boehm.c:105
Wu Zhou
woodzltc@cn.ibm.com
Thu Jan 26 13:11:00 GMT 2006
Hello gcj developers,
I encontered one problem while using the following script to build
a testcase in 32-bits mode on PPC64, it reports "ICE in
mark_reference_fields, at java/boehm.c:105.". If building in 64-bits mode,
it only reports an undefined reference:
/tmp/ccggTln9.o(.toc+0x10): undefined reference to `cniinner::child::class$'
collect2: ld returned 1 exit status
This case is running on RHEL4 U2. It failed with 4.0.1, 4.0.2, 4.1
snapshot 20060106 and also gcc trunk (Janis can reproduce that). Janis
also verified that it failed on GCC-3.2.3 of RHEL3.
Running this in x86 won't trigger any errors.
Anyone has a solution for this? Thanks a lot!
recreate.sh
================================
#! /bin/sh
#PREFIX=/opt/gcc-nightly/trunk
PREFIX=/usr
#GCJ="${PREFIX}/bin/gcj -m64"
GCJ=${PREFIX}/bin/gcj
GCJH=${PREFIX}/bin/gcjh
rm -rf cniinner
mkdir cniinner
$GCJ -d . -C Parent.java
$GCJ -d . -C Child.java
$GCJH -I. cniinner.Parent
$GCJH -I. cniinner.Child
$GCJH -I. 'cniinner.Child$Nested'
$GCJ -g -I. -c -o cniinner/native.o native.cxx
$GCJ -g -I. --main=cniinner.child -o cniinner/a.out \
Parent.java Child.java cniinner/native.o
Parent.java
===========================
package cniinner;
class Parent
{
protected long l;
protected long m;
protected long o;
protected long p;
protected long q;
byte[] scratch = new byte[8];
}
Child.java
======================
package cniinner;
class Child
{
int i;
class Nested extends Parent
{
boolean b;
native void f ();
}
Nested nested ()
{
return new Nested ();
}
static public void main (String[] args)
{
Child c = new Child ();
Nested n = c.nested ();
n.f ();
}
}
native.cxx
======================
#include <gcj/cni.h>
#include "cniinner/Parent.h"
#include "cniinner/Child.h"
#include "cniinner/Child$Nested.h"
#include <stdio.h>
void
cniinner::Child$Nested::f ()
{
printf ("%d\n", this0ドル->i);
}
Regards
- Wu Zhou
More information about the Java
mailing list