aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/java/expr.c')
-rw-r--r--gcc/java/expr.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/java/expr.c b/gcc/java/expr.c
index b2e03fc..94f76fd 100644
--- a/gcc/java/expr.c
+++ b/gcc/java/expr.c
@@ -3117,6 +3117,12 @@ java_push_constant_from_pool (JCF *jcf, int index)
c = build_ref_from_constant_pool (index);
c = convert (promote_type (string_type_node), c);
}
+ else if (JPOOL_TAG (jcf, index) == CONSTANT_Class
+ || JPOOL_TAG (jcf, index) == CONSTANT_ResolvedClass)
+ {
+ tree record = get_class_constant (jcf, index);
+ c = build_class_ref (record);
+ }
else
c = get_constant (jcf, index);
push_value (c);