https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63997
--- Comment #5 from Iain Sandoe <iains at gcc dot gnu.org> --- (In reply to Dominique d'Humieres from comment #4) > Any objection to apply the following patch > > --- ../_clean/gcc/testsuite/gcc.dg/lto/pr61526_0.c 2014-08-21 > 21:02:16.000000000 +0200 > +++ gcc/testsuite/gcc.dg/lto/pr61526_0.c 2015-01-15 12:35:36.000000000 > +0100 > @@ -2,6 +2,7 @@ > /* { dg-lto-do link } */ > /* { dg-lto-options { { -fPIC -flto -flto-partition=1to1 } } } */ > /* { dg-extra-ld-options { -shared } } */ > +/* { dg-extra-ld-options "-Wl,-undefined,dynamic_lookup" { target > *-*-darwin* } } */ > > static void *master; > void *foo () { return master; } > > ? This seems reasonable and produces the expected output (an undefined external _master which is dynamically looked up).