]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
resolve.cc (_Jv_PrepareClass): Round up class size to multiple of alignment.
authorTom Tromey <tromey@redhat.com>
Tue, 15 Apr 2003 02:17:12 +0000 (02:17 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Tue, 15 Apr 2003 02:17:12 +0000 (02:17 +0000)
* resolve.cc (_Jv_PrepareClass): Round up class size to multiple
of alignment.

From-SVN: r65617

libjava/ChangeLog
libjava/resolve.cc

index d4403ef6ad4ec19116e1dfc0a36146dd76f471d6..8d9944d4c85f38cf0d0bdf62bbc1219f1393f181 100644 (file)
@@ -1,3 +1,8 @@
+2003-04-14  Tom Tromey  <tromey@redhat.com>
+
+       * resolve.cc (_Jv_PrepareClass): Round up class size to multiple
+       of alignment.
+
 2003-04-10  Tom Tromey  <tromey@redhat.com>
 
        * verify.cc (pop64): Removed.
index ea506452d583639172d5c439dd8c0ce59801a755..fbdc284945f9f03ec375d0d9f89fdde6569a5261 100644 (file)
@@ -513,7 +513,10 @@ _Jv_PrepareClass(jclass klass)
        }
     }
 
-  // set the instance size for the class
+  // Set the instance size for the class.  Note that first we round it
+  // to the alignment required for Object; this keeps us in sync with
+  // our current ABI.
+  instance_size = ROUND (instance_size, __alignof__ (java::lang::Object));
   clz->size_in_bytes = instance_size;
 
   // allocate static memory