diff options
Diffstat (limited to 'gcc/java/class.c')
-rw-r--r-- | gcc/java/class.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/java/class.c b/gcc/java/class.c index 2e00e74eb47..8217a950768 100644 --- a/gcc/java/class.c +++ b/gcc/java/class.c @@ -559,7 +559,7 @@ build_utf8_ref (name) int name_len = IDENTIFIER_LENGTH(name); char buf[60]; char *buf_ptr; - tree ctype, field, str_type, cinit, string; + tree ctype, field = NULL_TREE, str_type, cinit, string; static int utf8_count = 0; int name_hash; tree ref = IDENTIFIER_UTF8_REF (name); @@ -583,6 +583,7 @@ build_utf8_ref (name) TREE_TYPE (string) = str_type; PUSH_FIELD_VALUE (cinit, "data", string); FINISH_RECORD_CONSTRUCTOR (cinit); + TREE_CONSTANT (cinit) = 1; /* Build a unique identifier based on buf. */ sprintf(buf, "_Utf%d", ++utf8_count); @@ -608,6 +609,7 @@ build_utf8_ref (name) DECL_ARTIFICIAL (decl) = 1; DECL_IGNORED_P (decl) = 1; TREE_READONLY (decl) = 1; + TREE_THIS_VOLATILE (decl) = 0; DECL_INITIAL (decl) = cinit; TREE_CHAIN (decl) = utf8_decl_list; layout_decl (decl, 0); |