https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120241
--- Comment #3 from David Faust <dfaust at gcc dot gnu.org> --- The problem with the test is that he inner anonymous union does _not_ have preserve-access-index attribute. So it makes sense we stop there for CO-RE. But that means that the CO-RE relocation we generate ends up resolving to a union type, rather than the pointer type within the union. The verifier rejects the relocation as invalid because it must resolve to a pointer type. So I think: 1. The test should be fixed to properly attribute the anonymous union. 2. We should try to detect this case in gcc and warn/error.
