https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107950
--- Comment #11 from David Malcolm <dmalcolm at gcc dot gnu.org> --- (In reply to Richard Biener from comment #10) > I suppose a fix would be to provide a dummy implementation for > range_label_for_type_mismatch::get_text in lto/, but I wonder how > for example the fortran frontend avoids this issue? > > f951 has rich_location uses but no range_label_for_type_mismatch, it looks > like range_label_for_* is used only from the C family frontends, so maybe > another fix would be to move that class and implementation somewhere to > c-family/? AIUI class range_label_for_type_mismatch is only used: * by the C and C++ frontends (directly, and by range_label_for_format_type_mismatch), and * by maybe_range_label_for_tree_type_mismatch::get_text in gcc/gcc-rich-location.cc, which is used by class binary_op_rich_location in gcc/gcc-rich-location.{h,cc}; the latter is only used by the C/C++ frontends. So moving range_label_for_type_mismatch *and* binary_op_rich_location to c/cp/c-family might be a fix for this; I'm not sure.