diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-04-15 02:17:12 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-04-15 02:17:12 +0000 |
commit | 61118b566e602801bf93d5303034236fd7e82ade (patch) | |
tree | 7929c090a990917bcd2cfc4a031261135d8fa787 /libjava/resolve.cc | |
parent | 68acb842e92277cfb4b72499f3734c3bab021a92 (diff) | |
download | gcc-61118b566e602801bf93d5303034236fd7e82ade.tar.gz |
* resolve.cc (_Jv_PrepareClass): Round up class size to multiple
of alignment.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@65617 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/resolve.cc')
-rw-r--r-- | libjava/resolve.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libjava/resolve.cc b/libjava/resolve.cc index ea506452d58..fbdc284945f 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 |