]> sourceware.org Git - libabigail.git/commit
writer: Fix emitting of some member types within their scope
authorDodji Seketeli <dodji@redhat.com>
Wed, 2 Oct 2024 13:20:20 +0000 (15:20 +0200)
committerDodji Seketeli <dodji@redhat.com>
Thu, 3 Oct 2024 13:23:20 +0000 (15:23 +0200)
commitff0180b605a24a973212f181226083fcd5fdb7d2
tree81e43b3b6a88617c311dc3475cbcbaccd90c000d
parentcbbd449f343b71f0b36953efdc15e4e6bd00d01e
writer: Fix emitting of some member types within their scope

When the canonical type of the scope type T of a member type MT
doesn't contain MT, then emitting T (obviously) doesn't emit MT.  The
ABIXML writer detects that MT wasn't emitted, but then mistakenly
emits MT in the global scope, making MT lose its T scope.

When the ABIXML is read back again, MT mistakenly becomes a
non-qualified type, leading to a self-comparison error.

This issue appears when self-comparing gcc-gnat on fc36 on armv7hl at
least.

This patch fixes the issue by making write_decl_in_scope detect that
emitting T hasn't emitted MT.  In that case, the function still needs
to emit the tags of the scope of MT and then emit MT.

* src/abg-writer.cc (write_decl_in_scope): Detect that emitting a
scope type T doesn't emit a particular member type MT that we are
looking at.  In that case, the function still needs to emit the
tags of the scope of MT and then emit MT even though T was just
emitted.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
src/abg-writer.cc
This page took 0.03059 seconds and 5 git commands to generate.