If the member is is itself a struct or an array, the next member must not
begin before the next alignment boundary.
}
r_size = total;
r_alignment = max_align;
+ r_size += r_alignment-1;
+ r_size -= r_size%r_alignment;
}
void MemoryRequirementsCalculator::visit(VariableDeclaration &var)
{
unsigned aligned_size = r_size+r_alignment-1;
aligned_size -= aligned_size%r_alignment;
- r_size += aligned_size*(literal->value.value<int>()-1);
+ r_size = aligned_size*literal->value.value<int>();
}
}