diff options
author | Andrew Haley <aph@redhat.com> | 2006-06-13 12:43:56 +0000 |
---|---|---|
committer | Andrew Haley <aph@gcc.gnu.org> | 2006-06-13 12:43:56 +0000 |
commit | 572f9e47d337227229ab222bd9e1ff943f77b127 (patch) | |
tree | a865761ebe0ff87e13924a3c9729169a6cc61811 /gcc/java/class.c | |
parent | f0f1c408bc6c6a6011a7b3bc1bd5f7dfdf4f6719 (diff) | |
download | gcc-572f9e47d337227229ab222bd9e1ff943f77b127.zip gcc-572f9e47d337227229ab222bd9e1ff943f77b127.tar.gz gcc-572f9e47d337227229ab222bd9e1ff943f77b127.tar.bz2 |
re PR java/1305 ([JSR133] GCJ ignores volatile modifier)
2006-06-09 Andrew Haley <aph@redhat.com>
PR java/1305
PR java/27908
* builtins.c (initialize_builtins): Add __sync_synchronize().
* class.c (add_field): Mark volatile fields.
* java-gimplify.c (java_gimplify_expr): Call new functions to
handle self-modifying exprs and COMPONENT_REFs.
(java_gimplify_component_ref): New.
(java_gimplify_modify_expr): Add handling for volatiles.
From-SVN: r114609
Diffstat (limited to 'gcc/java/class.c')
-rw-r--r-- | gcc/java/class.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/java/class.c b/gcc/java/class.c index 44f435c..972877d 100644 --- a/gcc/java/class.c +++ b/gcc/java/class.c @@ -785,7 +785,11 @@ add_field (tree class, tree name, tree field_type, int flags) if (flags & ACC_PROTECTED) FIELD_PROTECTED (field) = 1; if (flags & ACC_PRIVATE) FIELD_PRIVATE (field) = 1; if (flags & ACC_FINAL) FIELD_FINAL (field) = 1; - if (flags & ACC_VOLATILE) FIELD_VOLATILE (field) = 1; + if (flags & ACC_VOLATILE) + { + FIELD_VOLATILE (field) = 1; + TREE_THIS_VOLATILE (field) = 1; + } if (flags & ACC_TRANSIENT) FIELD_TRANSIENT (field) = 1; if (is_static) { |