This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PR java/27908: Honour volatile


We weren't setting TREE_THIS_VOLATILE on fields.

Committed to trunk and 4.1 branch.

Andrew.


2006-06-07  Andrew Haley  <aph@redhat.com>

	PR java/27908
	* class.c (add_field): Set TREE_THIS_VOLATILE on fields.

Index: gcc/java/class.c
===================================================================
--- gcc/java/class.c	(revision 114388)
+++ gcc/java/class.c	(working copy)
@@ -785,7 +785,11 @@
   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)
     {


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]