https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67632
--- Comment #12 from Jonathan Wakely <redi at gcc dot gnu.org> --- It seems to have been fixed in 6.3.0 tmp$ ~/gcc/6.2.0/bin/g++ -E t.cc -o t.ii tmp$ ~/gcc/6.2.0/bin/g++ -E x.cc -o x.ii tmp$ ~/gcc/6.2.0/bin/g++ t.ii x.ii /tmp/ccdXPlNS.o: In function `copy(std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int> > > const&)': x.cc:(.text+0x1f): undefined reference to `std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int> > >::unordered_map(std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int> > > const&)' collect2: error: ld returned 1 exit status tmp$ ~/gcc/6.3.0/bin/g++ t.ii x.ii I'll bisect it.