This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Java: prevent ICE for --with-gc=simple
- To: gcc-patches at gcc dot gnu dot org
- Subject: [PATCH] Java: prevent ICE for --with-gc=simple
- From: Jeff Sturm <jsturm at one-point dot com>
- Date: Mon, 30 Jul 2001 22:58:12 -0400 (EDT)
- cc: java-patches at gcc dot gnu dot org
Antonio Ake pointed out that gcj ICEs if configured with --with-gc=simple.
Using ggc_mark_tree in BUILD_FILENAME_IDENTIFIER_NODE looks wrong; it
should fail when called outside of a collection, though page GC seems to
ignore it. (The identifier node should be registered through parse_roots;
I'm not sure why this patch was needed and unfortunately the original
message is lost in the archives.)
Bootstrapped on the trunk with both simple and page GC. OK to commit?
2001-07-30 Jeff Sturm <jsturm@one-point.com>
* java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
Use ggc_add_tree_root to register roots.
Index: java-tree.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/java-tree.h,v
retrieving revision 1.115
diff -u -r1.115 java-tree.h
--- java-tree.h 2001/07/06 04:31:03 1.115
+++ java-tree.h 2001/07/31 02:42:51
@@ -1459,7 +1459,7 @@
if (!((F) = maybe_get_identifier ((S)))) \
{ \
(F) = get_identifier ((S)); \
- ggc_mark_tree ((F)); \
+ ggc_add_tree_root (&(F), 1); \
}
/* Add a FIELD_DECL to RECORD_TYPE RTYPE.