From 63019f0c1a34df76c0194828e6bcb7d7aa1542cd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Manuel=20L=C3=B3pez-Ib=C3=A1=C3=B1ez?= Date: Fri, 4 Sep 2015 18:37:50 +0000 Subject: [PATCH] re PR fortran/67429 (Missing part of error messages.) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 2015-09-04 Manuel López-Ibáñez PR fortran/67429 * error.c (gfc_clear_pp_buffer): Reset last_location, otherwise caret lines might be skipped when actually giving a diagnostic. From-SVN: r227500 --- gcc/fortran/ChangeLog | 6 ++++++ gcc/fortran/error.c | 3 +++ 2 files changed, 9 insertions(+) diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 88c1a117caa..82f816d30c0 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2015-09-04 Manuel López-Ibáñez + + PR fortran/67429 + * error.c (gfc_clear_pp_buffer): Reset last_location, otherwise + caret lines might be skipped when actually giving a diagnostic. + 2015-08-31 Francois-Xavier Coudert PR fortran/54833 diff --git a/gcc/fortran/error.c b/gcc/fortran/error.c index 7689bbd8941..3825751ddd0 100644 --- a/gcc/fortran/error.c +++ b/gcc/fortran/error.c @@ -757,6 +757,9 @@ gfc_clear_pp_buffer (output_buffer *this_buffer) pp->buffer = this_buffer; pp_clear_output_area (pp); pp->buffer = tmp_buffer; + /* We need to reset last_location, otherwise we may skip caret lines + when we actually give a diagnostic. */ + global_dc->last_location = UNKNOWN_LOCATION; } -- 2.30.2