https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110110
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Andrew Pinski from comment #2) > There is no std::remove in that preprocessed source ... Actually there is but after the use of std::remove. std::remove is used on line 75440 but only declared at line 87230 in the preprocessed source. I think someone didn't include the header file as they should have before the use. I suspect stats-collector.h needs an include of <algorithm> . maybe r14-1459-g940645cec500ab5fda849130e5353e86dce3bed5