https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90020
--- Comment #16 from Dominique d'Humieres <dominiq at lps dot ens.fr> --- > /* { dg-require-weak "" } */ > > was supposed to make it UNSUPPORTED on targets where it doesn't work. Apparently this not enough. From gcc.dg/attr-weakref-1.c I see // { dg-additional-options "-Wl,-undefined,dynamic_lookup" { target *-*-darwin* } } // { dg-additional-options "-Wl,-flat_namespace" { target *-*-darwin[89]* } } The test links on x86_64-apple-darwin18 if I add -Wl,-undefined,dynamic_lookup.