This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch: Fix for PR 1866
- To: Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Subject: Patch: Fix for PR 1866
- From: Tom Tromey <tromey at redhat dot com>
- Date: 05 Feb 2001 16:32:10 -0700
- Cc: Java Patch List <java-patches at gcc dot gnu dot org>
- Reply-To: tromey at redhat dot com
Alex approved this, so I'm checking it in.
It fixes PR 1866.
2001-02-04 Tom Tromey <tromey@redhat.com>
* expr.c (java_lang_expand_expr): Don't bother recomputing
`length'. Use rest_of_decl_compilation, not make_decl_rtl.
Fixes PR java/1866.
Tom
Index: expr.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/expr.c,v
retrieving revision 1.101
diff -u -r1.101 expr.c
--- expr.c 2001/02/04 22:44:02 1.101
+++ expr.c 2001/02/05 23:26:23
@@ -2388,9 +2388,7 @@
FINISH_RECORD_CONSTRUCTOR (temp);
START_RECORD_CONSTRUCTOR (value, array_type);
PUSH_SUPER_VALUE (value, temp);
- /* FIXME: build a new `length' here to get it on the right
- obstack. */
- PUSH_FIELD_VALUE (value, "length", build_int_2 (ilength, 0));
+ PUSH_FIELD_VALUE (value, "length", length);
PUSH_FIELD_VALUE (value, "data", init);
FINISH_RECORD_CONSTRUCTOR (value);
@@ -2400,7 +2398,7 @@
DECL_INITIAL (init_decl) = value;
DECL_IGNORED_P (init_decl) = 1;
TREE_READONLY (init_decl) = 1;
- make_decl_rtl (init_decl, NULL);
+ rest_of_decl_compilation (init_decl, NULL, 1, 0);
TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (init_decl)) = 1;
init = build1 (ADDR_EXPR, TREE_TYPE (exp), init_decl);
r = expand_expr (init, target, tmode, modifier);
@@ -2423,7 +2421,7 @@
DECL_INITIAL (init_decl) = init;
DECL_IGNORED_P (init_decl) = 1;
TREE_READONLY (init_decl) = 1;
- make_decl_rtl (init_decl, NULL);
+ rest_of_decl_compilation (init_decl, NULL, 1, 0);
TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (init_decl)) = 1;
init = init_decl;
}