From: Manuel López-Ibáñez Date: Fri, 4 Sep 2015 18:37:50 +0000 (+0000) Subject: re PR fortran/67429 (Missing part of error messages.) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=63019f0c1a34df76c0194828e6bcb7d7aa1542cd;p=gcc.git re PR fortran/67429 (Missing part of error messages.) 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 --- 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; }