Commit 40aaba2b by Tom Tromey Committed by Tom Tromey

re GNATS gcj/162 (gcj does not initialize interfaces according to spec)

	* parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
	when trying to see if field's class should be initialized.  Always
	initialize field's declaring class, not qualified class.
	For PR gcj/162.

From-SVN: r34182
parent b8c5b1c6
2000-05-25 Tom Tromey <tromey@cygnus.com> 2000-05-25 Tom Tromey <tromey@cygnus.com>
* parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
when trying to see if field's class should be initialized. Always
initialize field's declaring class, not qualified class.
For PR gcj/162.
* parse.y (array_constructor_check_entry): Pass `wfl_value', not * parse.y (array_constructor_check_entry): Pass `wfl_value', not
`wfl_operator', to maybe_build_primttype_type_ref. `wfl_operator', to maybe_build_primttype_type_ref.
Fixes PR gcj/235. Fixes PR gcj/235.
......
...@@ -11236,7 +11236,6 @@ resolve_field_access (qual_wfl, field_decl, field_type) ...@@ -11236,7 +11236,6 @@ resolve_field_access (qual_wfl, field_decl, field_type)
is_static = JDECL_P (decl) && FIELD_STATIC (decl); is_static = JDECL_P (decl) && FIELD_STATIC (decl);
if (FIELD_FINAL (decl) if (FIELD_FINAL (decl)
&& JPRIMITIVE_TYPE_P (TREE_TYPE (decl)) && JPRIMITIVE_TYPE_P (TREE_TYPE (decl))
&& DECL_LANG_SPECIFIC (decl)
&& DECL_INITIAL (decl)) && DECL_INITIAL (decl))
{ {
field_ref = DECL_INITIAL (decl); field_ref = DECL_INITIAL (decl);
...@@ -11250,7 +11249,7 @@ resolve_field_access (qual_wfl, field_decl, field_type) ...@@ -11250,7 +11249,7 @@ resolve_field_access (qual_wfl, field_decl, field_type)
return error_mark_node; return error_mark_node;
if (is_static && !static_final_found if (is_static && !static_final_found
&& !flag_emit_class_files && !flag_emit_xref) && !flag_emit_class_files && !flag_emit_xref)
field_ref = build_class_init (type_found, field_ref); field_ref = build_class_init (DECL_CONTEXT (decl), field_ref);
} }
else else
field_ref = decl; field_ref = decl;
......
...@@ -8604,7 +8604,6 @@ resolve_field_access (qual_wfl, field_decl, field_type) ...@@ -8604,7 +8604,6 @@ resolve_field_access (qual_wfl, field_decl, field_type)
is_static = JDECL_P (decl) && FIELD_STATIC (decl); is_static = JDECL_P (decl) && FIELD_STATIC (decl);
if (FIELD_FINAL (decl) if (FIELD_FINAL (decl)
&& JPRIMITIVE_TYPE_P (TREE_TYPE (decl)) && JPRIMITIVE_TYPE_P (TREE_TYPE (decl))
&& DECL_LANG_SPECIFIC (decl)
&& DECL_INITIAL (decl)) && DECL_INITIAL (decl))
{ {
field_ref = DECL_INITIAL (decl); field_ref = DECL_INITIAL (decl);
...@@ -8618,7 +8617,7 @@ resolve_field_access (qual_wfl, field_decl, field_type) ...@@ -8618,7 +8617,7 @@ resolve_field_access (qual_wfl, field_decl, field_type)
return error_mark_node; return error_mark_node;
if (is_static && !static_final_found if (is_static && !static_final_found
&& !flag_emit_class_files && !flag_emit_xref) && !flag_emit_class_files && !flag_emit_xref)
field_ref = build_class_init (type_found, field_ref); field_ref = build_class_init (DECL_CONTEXT (decl), field_ref);
} }
else else
field_ref = decl; field_ref = 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