Commit 6d091870 by Tom Tromey Committed by Tom Tromey

re PR java/1866 (Array initializer: undefined reference to `LJv0.0')

	* expr.c (java_lang_expand_expr): Don't bother recomputing
	`length'.  Use rest_of_decl_compilation, not make_decl_rtl.
	Fixes PR java/1866.

From-SVN: r39470
parent 56cf87e7
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.
2001-02-05 Alexandre Petit-Bianco <apbianco@cygnus.com> 2001-02-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (process_imports): Save the original name of the import * parse.y (process_imports): Save the original name of the import
......
...@@ -2388,9 +2388,7 @@ java_lang_expand_expr (exp, target, tmode, modifier) ...@@ -2388,9 +2388,7 @@ java_lang_expand_expr (exp, target, tmode, modifier)
FINISH_RECORD_CONSTRUCTOR (temp); FINISH_RECORD_CONSTRUCTOR (temp);
START_RECORD_CONSTRUCTOR (value, array_type); START_RECORD_CONSTRUCTOR (value, array_type);
PUSH_SUPER_VALUE (value, temp); PUSH_SUPER_VALUE (value, temp);
/* FIXME: build a new `length' here to get it on the right PUSH_FIELD_VALUE (value, "length", length);
obstack. */
PUSH_FIELD_VALUE (value, "length", build_int_2 (ilength, 0));
PUSH_FIELD_VALUE (value, "data", init); PUSH_FIELD_VALUE (value, "data", init);
FINISH_RECORD_CONSTRUCTOR (value); FINISH_RECORD_CONSTRUCTOR (value);
...@@ -2400,7 +2398,7 @@ java_lang_expand_expr (exp, target, tmode, modifier) ...@@ -2400,7 +2398,7 @@ java_lang_expand_expr (exp, target, tmode, modifier)
DECL_INITIAL (init_decl) = value; DECL_INITIAL (init_decl) = value;
DECL_IGNORED_P (init_decl) = 1; DECL_IGNORED_P (init_decl) = 1;
TREE_READONLY (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; TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (init_decl)) = 1;
init = build1 (ADDR_EXPR, TREE_TYPE (exp), init_decl); init = build1 (ADDR_EXPR, TREE_TYPE (exp), init_decl);
r = expand_expr (init, target, tmode, modifier); r = expand_expr (init, target, tmode, modifier);
...@@ -2423,7 +2421,7 @@ java_lang_expand_expr (exp, target, tmode, modifier) ...@@ -2423,7 +2421,7 @@ java_lang_expand_expr (exp, target, tmode, modifier)
DECL_INITIAL (init_decl) = init; DECL_INITIAL (init_decl) = init;
DECL_IGNORED_P (init_decl) = 1; DECL_IGNORED_P (init_decl) = 1;
TREE_READONLY (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; TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (init_decl)) = 1;
init = init_decl; init = init_decl;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment