This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[gcjx] Patch: FYI: fix object array creation
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 11 Oct 2005 16:47:28 -0600
- Subject: [gcjx] Patch: FYI: fix object array creation
- Reply-to: tromey at redhat dot com
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,