This is the mail archive of the java-patches@gcc.gnu.org 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]
Other format: [Raw text]

[gcjx] Patch: FYI: fix object array creation


I'm checking this in on the gcjx branch.

This fixes a bug causing object array creation to yield the wrong
type.

Tom

Index: ChangeLog
from  Tom Tromey  <tromey@redhat.com>
	* tree.cc (build_new_object_array): Build reference to element
	type, not array type.

Index: tree.cc
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/Attic/tree.cc,v
retrieving revision 1.1.2.63
diff -u -r1.1.2.63 tree.cc
--- tree.cc 11 Oct 2005 21:14:56 -0000 1.1.2.63
+++ tree.cc 11 Oct 2005 22:53:39 -0000
@@ -2504,7 +2504,7 @@
 {
   model_class *array_type = assert_cast<model_class *> (elt_type->array ());
 
-  tree elt_type_tree = build_class_ref (array_type, elt_type);
+  tree elt_type_tree = build_class_ref (elt_type, elt_type);
   tree array_type_tree = gcc_builtins->lay_out_class (array_type);
 
   tree args = tree_cons (NULL_TREE, size,


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