https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106833
--- Comment #8 from Kewen Lin <linkw at gcc dot gnu.org> --- Created attachment 53542 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53542&action=edit Specially handle opaque type in verify_type (In reply to Segher Boessenkool from comment #7) > (In reply to rguent...@suse.de from comment #6) > > Ah, that special "mode". I think verify_types shouldn't do anything > > for OPAQUE_TYPES or alternatively trust the targets setup of > > TYPE_MAIN_VARIANT/TYPE_CANONICAL. Maybe verify TYPE_CANONICAL > > and TYPE_MAIN_VARIANT are also OPAQUE_TYPE. > > It's probably easiest to just test if the TYPE_MODEs match, for OPAQUE_TYPEs? Thanks for suggestions from both of you! Following your suggestions, I made a patch which also considers size and alignment information which is mentioned in the documentation, does it make sense to you?