Calculate correst size for subclass subtyping.
authorbdemsky <bdemsky>
Thu, 8 Jul 2004 04:06:46 +0000 (04:06 +0000)
committerbdemsky <bdemsky>
Thu, 8 Jul 2004 04:06:46 +0000 (04:06 +0000)
Repair/RepairCompiler/MCC/IR/StructureTypeDescriptor.java

index 4a2b55a..c5f197b 100755 (executable)
@@ -58,7 +58,7 @@ public class StructureTypeDescriptor extends TypeDescriptor {
 
     private Expr internalgetOffsetExpr(FieldDescriptor field) {
        /* Fix sizeof calculations */
-       if ((field==null)&&(subtype!=null))
+       if ((field==null)&&(subtype!=null)&&(!subclass))
            return subtype.getSizeExpr();
 
        boolean aligned=true;