https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104592
--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> --- I don't know why you think this is a bug in GCC, the spiff_profile_id is a scoped enumeration type, which cannot be written to an ostream unless there is an operator<< overload for it.