https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96540
--- Comment #1 from Jürgen Reuter <juergen.reuter at desy dot de> --- It seems that the problem is in the declaration of the following variables in value_range.h: template <unsigned X> friend void gt_ggc_mx (int_range<X> *); template <unsigned X> friend void gt_pch_nx (int_range<X> *); template <unsigned X> friend void gt_pch_nx (int_range<X> *, gt_pointer_operator, void *); // ?? hash-traits.h has its own extern for these, which is causing // them to never be picked up by the templates. For now, define // elsewhere. //template<unsigned X> friend void gt_ggc_mx (int_range<X> *&); //template<unsigned X> friend void gt_pch_nx (int_range<X> *&); This declaration is commented out, but above it is set, which looks suspicious. If I comment out the three declarations for friend void gt_ggc_mx, then the code seems to compile.