aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/constants.c
diff options
context:
space:
mode:
authorAlexandre Petit-Bianco <apbianco@cygnus.com>2000-03-14 05:01:05 +0000
committerAlexandre Petit-Bianco <apbianco@cygnus.com>2000-03-14 05:01:05 +0000
commita3a1340d014bdc1dcd45565f761e2148f7ab06af (patch)
treebf1619873e76c17441a1423f1eaba6a4a64f054a /gcc/java/constants.c
parenteabe7f7bd8d1859050b3a4cb8f4ed448a4b79ad0 (diff)
Added Java 1.1 language features.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@32517 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java/constants.c')
-rw-r--r--gcc/java/constants.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/java/constants.c b/gcc/java/constants.c
index b747ac8e794..d465f52ae98 100644
--- a/gcc/java/constants.c
+++ b/gcc/java/constants.c
@@ -390,7 +390,10 @@ alloc_class_constant (clas)
static tree
build_constant_data_ref ()
{
- if (current_constant_pool_data_ref == NULL_TREE)
+ if (TYPE_CPOOL_DATA_REF (current_class))
+ current_constant_pool_data_ref = TYPE_CPOOL_DATA_REF (current_class);
+
+ else if (current_constant_pool_data_ref == NULL_TREE)
{
tree decl;
tree decl_name = mangled_classname ("_CD_", current_class);
@@ -401,7 +404,7 @@ build_constant_data_ref ()
TREE_STATIC (decl) = 1;
make_decl_rtl (decl, NULL, 1);
pop_obstacks ();
- current_constant_pool_data_ref
+ TYPE_CPOOL_DATA_REF (current_class) = current_constant_pool_data_ref
= build1 (ADDR_EXPR, ptr_type_node, decl);
}
return current_constant_pool_data_ref;