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
This commit is contained in:
Tom Tromey 2000-05-26 01:16:20 +00:00 committed by Tom Tromey
parent b8c5b1c6d5
commit 40aaba2b81
3 changed files with 7 additions and 4 deletions

View File

@ -1,5 +1,10 @@
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
`wfl_operator', to maybe_build_primttype_type_ref.
Fixes PR gcj/235.

View File

@ -11236,7 +11236,6 @@ resolve_field_access (qual_wfl, field_decl, field_type)
is_static = JDECL_P (decl) && FIELD_STATIC (decl);
if (FIELD_FINAL (decl)
&& JPRIMITIVE_TYPE_P (TREE_TYPE (decl))
&& DECL_LANG_SPECIFIC (decl)
&& DECL_INITIAL (decl))
{
field_ref = DECL_INITIAL (decl);
@ -11250,7 +11249,7 @@ resolve_field_access (qual_wfl, field_decl, field_type)
return error_mark_node;
if (is_static && !static_final_found
&& !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
field_ref = decl;

View File

@ -8604,7 +8604,6 @@ resolve_field_access (qual_wfl, field_decl, field_type)
is_static = JDECL_P (decl) && FIELD_STATIC (decl);
if (FIELD_FINAL (decl)
&& JPRIMITIVE_TYPE_P (TREE_TYPE (decl))
&& DECL_LANG_SPECIFIC (decl)
&& DECL_INITIAL (decl))
{
field_ref = DECL_INITIAL (decl);
@ -8618,7 +8617,7 @@ resolve_field_access (qual_wfl, field_decl, field_type)
return error_mark_node;
if (is_static && !static_final_found
&& !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
field_ref = decl;