https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80012
Mikael Morin <mikael at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mikael at gcc dot gnu.org
--- Comment #15 from Mikael Morin <mikael at gcc dot gnu.org> ---
gfc_error_opt does:
791 if (buffered_p)
792 global_dc->set_diagnostic_buffer (pp_error_buffer);
and context::set_diagnostic_buffer has:
47 /* We don't allow changing buffering within a diagnostic group
48 (to simplify handling of buffered diagnostics within the
49 diagnostic_format implementations). */
50 gcc_assert (m_diagnostic_groups.m_group_nesting_depth == 0);
So diagnostic groups are somehow incompatible with the error buffering used in
the fortran frontend, or at least with modifications of the buffer pointer.
The error reporting in gfc_error_opt is enclosed between:
786 diagnostics::buffer *old_buffer = global_dc->get_diagnostic_buffer ();
787 gcc_assert (!old_buffer);
... and ...
798 if (buffered_p)
799 global_dc->set_diagnostic_buffer (old_buffer);
maybe we can avoid calling set_diagnostic_buffer if old_buffer is already
pp_error_buffer?