aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/expr.c
diff options
context:
space:
mode:
authorBryce McKinlay <mckinlay@redhat.com>2004-06-26 20:42:01 +0000
committerBryce McKinlay <bryce@gcc.gnu.org>2004-06-26 21:42:01 +0100
commit6573a10434b3aa2784f052d6ffc3905d8490464e (patch)
tree36f0831cf263a41813abec5f1578abd8d32271a1 /gcc/java/expr.c
parented7f23690a8c1cf8295cf151719d7b07f7b68bce (diff)
downloadgcc-6573a10434b3aa2784f052d6ffc3905d8490464e.zip
gcc-6573a10434b3aa2784f052d6ffc3905d8490464e.tar.gz
gcc-6573a10434b3aa2784f052d6ffc3905d8490464e.tar.bz2
re PR java/15734 (internal compiler error: Segmentation fault)
PR java/15734 * expr.c (expand_java_field_op): Ensure that target class for static field access has been loaded. From-SVN: r83720
Diffstat (limited to 'gcc/java/expr.c')
-rw-r--r--gcc/java/expr.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/java/expr.c b/gcc/java/expr.c
index 446f8af..d4f25f8 100644
--- a/gcc/java/expr.c
+++ b/gcc/java/expr.c
@@ -2375,7 +2375,11 @@ expand_java_field_op (int is_static, int is_putting, int field_ref_index)
tree new_value = is_putting ? pop_value (field_type) : NULL_TREE;
tree field_ref;
int is_error = 0;
- tree field_decl = lookup_field (&self_type, field_name);
+ tree field_decl;
+
+ if (! CLASS_LOADED_P (self_type))
+ load_class (self_type, 1);
+ field_decl = lookup_field (&self_type, field_name);
if (field_decl == error_mark_node)
{
is_error = 1;