This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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]

Re: New libjava failures


Diego Novillo wrote:

They all seem to fail with:

PR235.java:3: internal compiler error: in build_int_cst, at tree.c:493

I can't really see where now.  Cutting and pasting the command line from
libjava.log is not working for me (the FE segfaults because it claims it
can't find some .java class).
I find I have to lauch gdb in the libjava build directory.

From the looks of it, it looks similar to what we discussed a few hours
ago on IRC.  Some pass is changing the type of a constant after it's put
in the cache.
yes, indeed.

I've installed the attached obvious patch, after running the libjava
testsuite on i686-pc-linux-gnu.

nathan

--
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk

2004-08-20  Nathan Sidwell  <nathan@codesourcery.com>

	* expr.c (build_java_arrayaccess): Use convert to change
	len's type.

Index: expr.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/expr.c,v
retrieving revision 1.202
diff -c -3 -p -r1.202 expr.c
*** expr.c	15 Aug 2004 15:45:30 -0000	1.202
--- expr.c	20 Aug 2004 09:03:57 -0000
*************** build_java_arrayaccess (tree array, tree
*** 763,770 ****
         * Note this is equivalent to and more efficient than:
         * INDEX < 0 || INDEX >= LEN && throw ... */
        tree test;
!       tree len = build_java_array_length_access (array);
!       TREE_TYPE (len) = unsigned_int_type_node;
        test = fold (build2 (GE_EXPR, boolean_type_node, 
  			   convert (unsigned_int_type_node, index),
  			   len));
--- 763,770 ----
         * Note this is equivalent to and more efficient than:
         * INDEX < 0 || INDEX >= LEN && throw ... */
        tree test;
!       tree len = convert (unsigned_int_type_node,
! 			  build_java_array_length_access (array));
        test = fold (build2 (GE_EXPR, boolean_type_node, 
  			   convert (unsigned_int_type_node, index),
  			   len));

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