https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63997
--- Comment #3 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> --- (In reply to Richard Biener from comment #1) > The testcase uses -shared at link time which is supposed to build a shared > object and generate an external (unresolved) reference to _master. Adding -Wl,-undefined,dynamic_lookup makes it pass. (And the -shared is correctly passed, as far as I can see.)