On 9 June 2017 at 15:11, Matt Godbolt wrote: > Hi all, > > I've been building many projects with LTO in GCC since support was > first added. I've just upgraded to GCC 7.1 (from 6.3) and all but one > of my projects build and run correctly with LTO on. > > The failing project has undefined references to > std::__cxx11::basic_string<char, std::char_traits<char>, > std::allocator<char> >::~basic_string() in several files. > > I'm a little perplexed at this: as best I can tell all files and > libraries are built with the same compiler, with the same flags (in > particular -std=c++1z). I'm clearly doing something wrong though, and > I wondered if anyone had any advice on how to diagnose and debug this > issue. I've run with -v and everything looks "ok" to my untrained eye. > Sadly the codebase is huge and proprietary I'm having trouble getting > a minimal reproduction case. This looks like https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81004 which has been reduced.