public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [gcjx] Patch: FYI: minor tree-lowering bug
@ 2005-10-04  2:07 Tom Tromey
  0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2005-10-04  2:07 UTC (permalink / raw)
  To: Java Patch List

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),

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-10-04  2:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-04  2:07 [gcjx] Patch: FYI: minor tree-lowering bug Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).