GCC Newspaper
JUNE 15, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
c++/modules

c++/modules: Fixes false ABI tag mismatch with modules.

Resolves a false positive ABI tag mismatch in C++ modules by ignoring inherited tags during comparison when mangling status differs.

Fixes a false positive ABI tag mismatch error that could occur when using C++ modules. The issue arose when a variable inherited an ABI tag from another type, but the tag was only propagated during mangling. If one version of the variable was mangled and another was not, a mismatch would be detected during module merging. The fix makes the comparison routine ignore inherited tags when there’s a mangling status difference, preventing the false positive.

In Details

The check_abi_tags routine in module.cc incorrectly diagnosed an ABI tag mismatch due to differences in mangling. The fix introduces ABI_TAG_INHERITED and modifies equal_abi_tags to ignore inherited tags when mangling status differs. ABI_TAG_IMPLICIT is renamed to ABI_TAG_NOT_MANGLED for clarity.

For Context

This commit addresses a bug in the GCC compiler related to C++ modules and ABI (Application Binary Interface) tags. C++ modules are a way to organize code into reusable units and improve build times. ABI tags are used to ensure compatibility between different compiled units. The bug caused a false error message indicating an ABI tag mismatch in certain situations involving inheritance and mangling (a process that converts identifiers into unique symbols). The fix prevents this false error message and ensures correct module compilation.

Filed Under: c++modulesabibugfix