aboutsummaryrefslogtreecommitdiff
path: root/libjava/resolve.cc
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2003-04-15 02:17:12 +0000
committerTom Tromey <tromey@gcc.gnu.org>2003-04-15 02:17:12 +0000
commit355d89939212294d4b0d1cf9bc3cd806eb6d7a84 (patch)
tree7929c090a990917bcd2cfc4a031261135d8fa787 /libjava/resolve.cc
parent88702c45a68e768f8d5537f2c6c77c9c7b7e6d58 (diff)
downloadgcc-355d89939212294d4b0d1cf9bc3cd806eb6d7a84.zip
gcc-355d89939212294d4b0d1cf9bc3cd806eb6d7a84.tar.gz
gcc-355d89939212294d4b0d1cf9bc3cd806eb6d7a84.tar.bz2
resolve.cc (_Jv_PrepareClass): Round up class size to multiple of alignment.
* resolve.cc (_Jv_PrepareClass): Round up class size to multiple of alignment. From-SVN: r65617
Diffstat (limited to 'libjava/resolve.cc')
-rw-r--r--libjava/resolve.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/libjava/resolve.cc b/libjava/resolve.cc
index ea50645..fbdc284 100644
--- a/libjava/resolve.cc
+++ b/libjava/resolve.cc
@@ -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