java compile failure

aking@dreammechanics.com aking@dreammechanics.com
Mon Aug 6 19:40:00 GMT 2001


I'm trying to compile our client program ( ~330 classes ) with gcj.
All seem to compile fine except for one class.  I've been able to
shrink it down to the minimum code required to generate the compile
error:

  aking@nanostorm:~/gcj-test$ gcj --main=Matrix4f -o Matrix4f Matrix4f.java
  Matrix4f.java: In class `Matrix4f':
  Matrix4f.java: In method `(float[])':
  Matrix4f.java:37: Internal compiler error in find_function_data, at function.c:328
  Please submit a full bug report,
  with preprocessed source if appropriate.
  See <URL: http://www.gnu.org/software/gcc/bugs.html > for instructions.

If you comment out the final two constructors, it compiles fine.  If you
comment out the static initializer block, it compiles.  I was able to
successfully compile it with both javac and jikes.  

I'm using the cvs version from Sunday night, with the "gcc-3_0-branch' tag.

My system:
aking@nanostorm:~/compile/gcc/CVS$ uname -a
Linux nanostorm 2.2.19 #2 SMP Fri Jul 27 23:51:38 EDT 2001 i686 unknown

Any ideas?

	Adam

============================ Matrix4f.java =====================

/**
*	A single precision floating point 4 by 4 matrix.
*	Primarily to support rotations 
*/
public class Matrix4f
{
	public float m00;
	public float m01;
	public float m02;
	public float m03;
	public float m10;
	public float m11;
	public float m12;
	public float m13;
	public float m20;
	public float m21;
	public float m22;
	public float m23;
	public float m30;
	public float m31;
	public float m32;
	public float m33;

	private float scale;

	static boolean initialized;
	static Matrix4f xmat;
	static Matrix4f ymat;
	static Matrix4f zmat;
	static Matrix4f tempMatrix1;
	static Matrix4f tempMatrix2;

	{
		if( !initialized )
		{
			initialized = true;
			xmat = new Matrix4f();
			ymat = new Matrix4f();
			zmat = new Matrix4f();
			tempMatrix1 = new Matrix4f();
			tempMatrix2 = new Matrix4f();
		}
	}

	public Matrix4f()
	{
		m00 = 1;
		m01 = 0;
		m02 = 0;
		m03 = 0;
		m10 = 0;
		m11 = 1;
		m12 = 0;
		m13 = 0;
		m20 = 0;
		m21 = 0;
		m22 = 1;
		m23 = 0;
		m30 = 0;
		m31 = 0;
		m32 = 0;
		m33 = 1;
	}

	public Matrix4f( float v[] )
	{
		m00 = v[0];
		m01 = v[1];
		m02 = v[2];
		m03 = v[3];
		m10 = v[4];
		m11 = v[5];
		m12 = v[6];
		m13 = v[7];
		m20 = v[8];
		m21 = v[9];
		m22 = v[10];
		m23 = v[11];
		m30 = v[12];
		m31 = v[13];
		m32 = v[14];
		m33 = v[15];
	}

	public Matrix4f( float m00, float m01, float m02, float m03,
		float m10, float m11, float m12, float m13, 
		float m20, float m21, float m22, float m23, 
		float m30, float m31, float m32, float m33 )
	{
		this.m00 = m00;
		this.m01 = m01;
		this.m02 = m02;
		this.m03 = m03;
		this.m10 = m10;
		this.m11 = m11;
		this.m12 = m12;
		this.m13 = m13;
		this.m20 = m20;
		this.m21 = m21;
		this.m22 = m22;
		this.m23 = m23;
		this.m30 = m30;
		this.m31 = m31;
		this.m32 = m32;
		this.m33 = m33;
	}

	public static void main( String[] args )
	{
		System.out.println( "Test main..." );
	}
}



More information about the Java mailing list