https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63998
--- Comment #4 from Dominique d'Humieres <dominiq at lps dot ens.fr> --- > If so, it would probably need > > // { dg-additional-options "-Wl,-undefined,dynamic_lookup" { target > *-*-darwin* } } > // { dg-additional-options "-Wl,-flat_namespace" { target *-*-darwin[89]* } } > > (see gcc.dg/attr-weakref-1.c). > > Untested so far. It does not work because lto does not support dg-additional-options. I confirm that adding -w to dg-lto-options fixes the failures. However I have noticed that there is a lto_prune_warns in lib/lto.exp. It would probably better to add "warning: alias definitions not supported in Mach-O; ignored" to the list.