https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81004
--- Comment #5 from Markus Trippelsdorf <trippels at gcc dot gnu.org> --- Created attachment 41494 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41494&action=edit crappy auto reduced testcase Here's the reduced testcase anyway: % g++ -O2 -c value_semantic.ii % g++ -w -Wl,--no-demangle lines.ii options.ii -O2 -std=c++1z -flto value_semantic.o 2>&1 | grep _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev value_semantic.o:value_semantic.ii:function _GLOBAL__sub_I__ZNSt7__cxx111aE: error: undefined reference to '_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev' (ld: the symbol should have been defined by a plugin) (without -flto ) % g++ -w -Wl,--no-demangle lines.ii options.ii -O2 -std=c++1z value_semantic.o 2>&1 | grep _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev %