https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86354
Marek Polacek <mpolacek at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mpolacek at gcc dot gnu.org --- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> --- The static_assert can be just static_assert( (X*) &y != (X*) &z); It ultimately comes down to symtab_node::equal_address_to, but due to the extern y and z are interposable so it returns -1.