fprintf: Do not add explicit padding when struct has __aligned__ attr

Fixes: 13e5b9fc00 ("fprintf: Add unnamed bitfield padding at the end to rebuild original type")
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Arnaldo Carvalho de Melo 2019-04-11 12:06:41 -03:00
parent b5e8fab596
commit 85c9936963
1 changed files with 1 additions and 1 deletions

View File

@ -1577,7 +1577,7 @@ static size_t __class__fprintf(struct class *class, const struct cu *cu,
last = pos;
}
if (class->padding != 0) {
if (class->padding != 0 && type->alignment == 0) {
tag_pos = cu__type(cu, last->tag.type);
size = tag__size(tag_pos, cu);