https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114574
--- Comment #28 from uecker at gcc dot gnu.org --- I do not fully understand yet what happens for may_alias, but it if we later complete the struct with the may_alias attribute it seems we would also need to update the previously created pointer so that it has TYPE_REF_CAN_ALIAS_ALL. Setting TYPE_STRUCTURAL_EQUALITY for incomplete structs also for pre-C23 seems to fix the assertion failure, but I am not sure if this fixes the underlying bug.