of multi dimensional arrays if dimension is divisable by 2
Unified · Split
| @@ -6229,8 +6229,15 @@ static int type_size(CType *type, int *a) · 6228 unmodified lines | |||
| 6229 | return s->c; | 6229 | return s->c; |
| 6230 | } else if (bt == VT_PTR) { | 6230 | } else if (bt == VT_PTR) { |
| 6231 | if (type->t & VT_ARRAY) { | 6231 | if (type->t & VT_ARRAY) { |
| 6232 | int ts; | ||
| 6233 | |||
| 6232 | s = type->ref; | 6234 | s = type->ref; |
| 6233 | return type_size(&s->type, a) * s->c; | 6235 | ts = type_size(&s->type, a); |
| 6236 | |||
| 6237 | if (ts < 0 && s->c < 0) | ||
| 6238 | ts = -ts; | ||
| 6239 | |||
| 6240 | return ts * s->c; | ||
| 6234 | } else { | 6241 | } else { |
| 6235 | *a = PTR_SIZE; | 6242 | *a = PTR_SIZE; |
| 6236 | return PTR_SIZE; | 6243 | return PTR_SIZE; |