[Bug c++/125541] ICE when reflect_constant_array is used on the data member list of a struct containing an anonymous union with no named member.

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Jun 1 09:40:43 GMT 2026


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125541

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
members_of(...)[0] is the type, that is mangled according to the
https://itanium-cxx-abi.github.io/cxx-abi/abi.html#mangling.named
rule:
<unnamed-type-name> ::= Ut [ <nonnegative number> ] _ 
(note, the ABI says "and that aren't anonymous union types" which is ignored).
But members_of(...)[1] here is the unnamed non-static data member with that
type, and the mangling of that is the cause of the ICE here.


More information about the Gcc-bugs mailing list