https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96032
--- Comment #4 from David Malcolm <dmalcolm at gcc dot gnu.org> --- I posted a prototype implementation of this here: "[PATCH 00/12] RFC: Replay of serialized diagnostics" https://gcc.gnu.org/pipermail/gcc-patches/2022-June/597051.html (doesn't fully work; see the many caveats in that post)