This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[gcjx] Patch: FYI: minor tree-lowering bug
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 03 Oct 2005 20:01:46 -0600
- Subject: [gcjx] Patch: FYI: minor tree-lowering bug
- Reply-to: tromey at redhat dot com
I'm checking this in on the generics branch.
This fixes a small bug in the tree back end. We weren't using the
correct type in a CALL_EXPR. (Really we should either have helper
functions to make all these things, or we should have code that checks
that all the types make sense -- in this case we were using a function
type as the return type, which makes no sense at all.0
This fixes a bug during libgcj bootstrap that I was having trouble
finding. Today I hit on a different approach -- I made a
frankenstein tree using an ordinary 4.0 build with the gcjx-based gcj
installed into it. This lets me easily compile test programs without
committing to trying to debug all of libgcj.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
* tree.cc (build_new_array): Use correct return type for function
call.
Index: tree.cc
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/Attic/tree.cc,v
retrieving revision 1.1.2.49
diff -u -r1.1.2.49 tree.cc
--- tree.cc 12 Jul 2005 17:25:44 -0000 1.1.2.49
+++ tree.cc 4 Oct 2005 02:03:23 -0000
@@ -2396,8 +2396,7 @@
tree array_type_tree = gcc_builtins->map_type (array_type);
- tree insn = build3 (CALL_EXPR,
- TREE_TYPE (TREE_TYPE (builtin_Jv_NewPrimArray)),
+ tree insn = build3 (CALL_EXPR, ptr_type_node,
builtin_Jv_NewPrimArray,
tree_cons (NULL_TREE,
build_class_ref (elt_type, request),