https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113617
--- Comment #25 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> --- Yes, that test in check_effective_target_shared actually works with C, but not with C++, because: Undefined symbols for architecture arm64: "__Z3foov", referenced from: __Z3bazv in ccCj5plO.o Why have we not seen it before? Because most of the use of that check is in { dg-require-effective-target shared } so we're effectively skipping tests, and that is silent. As far as I can tell, your addition is the first time { target shared } is used as a conditional in something like { dg-additional-options } in the C++ testsuite. Thanks for helping me figuring it out, that's definitely at least a darwin issue, which I'll take care of.