This is the mail archive of the java@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]

Re: ICE in inner class constructor.


Per Bothner <per@bothner.com> writes:

Actually, if you apply this patch, the library will fail to build:

/home/bothner/GNU/linux-gcc/gcc/gcj -B/home/bothner/GNU/linux-gcc/i686-pc-linux-gnu/libjava/ -B/home/bothner/GNU/linux-gcc/gcc/ --encoding=UTF-8 -C -g -classpath /home/bothner/GNU/linux-gcc/i686-pc-linux-gnu/libjava:/home/bothner/GNU/gcc/libjava -d /home/bothner/GNU/linux-gcc/i686-pc-linux-gnu/libjava java/io/ObjectInputStream.java
java/io/ObjectInputStream.java: In class `java.io.ObjectInputStream':
java/io/ObjectInputStream.java: In method `java.io.ObjectInputStream.readObject()':
java/io/ObjectInputStream.java:247: Tree check: expected expr_with_file_location, have class_literal in resolve_qualified_expression_name, at java/parse.y:9209
Please submit a full bug report,

I think the compiler needs to be fixed so the library can build with this
patch!

Index: tree.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree.h,v
retrieving revision 1.223.2.10
diff -u -r1.223.2.10 tree.h
--- tree.h	2001/05/22 03:01:50	1.223.2.10
+++ tree.h	2001/05/26 16:53:19
@@ -798,10 +798,11 @@
 #define LOOP_EXPR_BODY(NODE) TREE_OPERAND (NODE, 0)
 
 /* In a EXPR_WITH_FILE_LOCATION node.  */
-#define EXPR_WFL_NODE(NODE) TREE_OPERAND((NODE), 0)
+#define EXPR_WFL_CHECK(NODE) TREE_CHECK (NODE, EXPR_WITH_FILE_LOCATION)
+#define EXPR_WFL_NODE(NODE) TREE_OPERAND(EXPR_WFL_CHECK (NODE), 0)
 #define EXPR_WFL_FILENAME(NODE) \
   (IDENTIFIER_POINTER (EXPR_WFL_FILENAME_NODE ((NODE))))
-#define EXPR_WFL_FILENAME_NODE(NODE) TREE_OPERAND((NODE), 1)
+#define EXPR_WFL_FILENAME_NODE(NODE) TREE_OPERAND (EXPR_WFL_CHECK (NODE), 1)
 #define EXPR_WFL_LINENO(NODE) (EXPR_CHECK (NODE)->exp.complexity >> 12)
 #define EXPR_WFL_COLNO(NODE) (EXPR_CHECK (NODE)->exp.complexity & 0xfff)
 #define EXPR_WFL_LINECOL(NODE) (EXPR_CHECK (NODE)->exp.complexity)

-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/per/


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