+2015-06-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
+
+ PR fortran/66528
+ * error.c (gfc_warning_check): Restore the default output_buffer
+ before calling diagnostic_action_after_output.
+ (gfc_error_check): Likewise.
+ (gfc_diagnostics_init): Add comment.
+
2015-06-23 Andre Vehreschild <vehre@gmx.de>
PR fortran/64674
void
gfc_warning_check (void)
{
- /* This is for the new diagnostics machinery. */
if (! gfc_output_buffer_empty_p (pp_warning_buffer))
{
pretty_printer *pp = global_dc->printer;
warningcount += warningcount_buffered;
werrorcount += werrorcount_buffered;
gcc_assert (warningcount_buffered + werrorcount_buffered == 1);
+ pp->buffer = tmp_buffer;
diagnostic_action_after_output (global_dc,
warningcount_buffered
? DK_WARNING : DK_ERROR);
- pp->buffer = tmp_buffer;
}
}
pp_really_flush (pp);
++errorcount;
gcc_assert (gfc_output_buffer_empty_p (pp_error_buffer));
- diagnostic_action_after_output (global_dc, DK_ERROR);
pp->buffer = tmp_buffer;
+ diagnostic_action_after_output (global_dc, DK_ERROR);
return true;
}
global_dc->caret_chars[1] = '2';
pp_warning_buffer = new (XNEW (output_buffer)) output_buffer ();
pp_warning_buffer->flush_p = false;
+ /* pp_error_buffer is statically allocated. This simplifies memory
+ management when using gfc_push/pop_error. */
pp_error_buffer = &(error_buffer.buffer);
pp_error_buffer->flush_p = false;
}
+2015-06-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
+
+ PR fortran/66528
+ * gfortran.dg/maxerrors.f90: New test.
+
2015-06-08 DJ Delorie <dj@redhat.com>
* gcc.dg/torture/pr66345.c: Fix assumption about size_t type.