GCC 13 and 14 special-case the internal C++ type name __int128, but compare
the complete spelling. That recognizes the signed type and misses the internal
unsigned spelling, __int128 unsigned.
The offending C++ is:
using Signed_128 = __int128;
using Unsigned_128 =unsigned __int128;
Signed_128 signed_round_trip (Signed_128);
Unsigned_128 unsigned_round_trip (Unsigned_128);
The GCC 13/14 mapper currently produces one valid subtype and one reference to
an Ada identifier that does not exist:
subtype Signed_128 isExtensions.Signed_128;
subtype Unsigned_128 is uu_int128_unsigned;
It should recognize both internal names as 128-bit integer types and produce:
The correction uses the eight-character __int128 prefix comparison already
present in GCC 15 and 16. Those releases are known-good controls and receive no
code patch. The executable regression passes negative signed and high-bit
unsigned values by value from C++ to Ada, back through C++, and into C++ value
checkers at -O0 and -O2.
Run it against an unpatched or patched compiler root:
GNAT rejects the generated specification because uu_int128_unsigned is undefined.
After the patch
Signed and unsigned 128-bit values round-trip by value through Ada and C++ at -O0 and -O2.
Upstream issue
Pending GCC Bugzilla filing.
Upstream submission
Not yet filed or submitted upstream.
Provenance
Repository-authored backport of the __int128 prefix recognition present in the pinned GCC 15 and 16 sources, with an executable regression; exact application verified locally against the pinned Darwin GCC 13 and 14 identities. Pinned FSF release application is required by Linux CI.
Licensing
GCC-derived compiler hunks remain GPL-3.0-or-later. The new test is proposed for the GCC testsuite under GCC project terms.