This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gfortran] Assorted matching fixes, fix No 1 from PR16404
- From: Tobias Schlüter <tobias dot schlueter at physik dot uni-muenchen dot de>
- To: Paul Brook <paul at codesourcery dot com>
- Cc: fortran at gcc dot gnu dot org, patch <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 16 Jul 2004 03:08:58 +0200
- Subject: Re: [gfortran] Assorted matching fixes, fix No 1 from PR16404
- References: <40F434A5.9020009@physik.uni-muenchen.de> <200407160007.29786.paul@codesourcery.com>
Paul Brook wrote:
>
> Ok.
Along with the testcase, I committed this obvious fix, which makes the error
message print the right locus for the top of the loop even if the loop body
contains multiple statements.
Built and tested on i686-pc-linux.
- Tobi
Index: fortran/ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fortran/ChangeLog,v
retrieving revision 1.131
diff -u -p -r1.131 ChangeLog
--- fortran/ChangeLog 16 Jul 2004 00:39:39 -0000 1.131
+++ fortran/ChangeLog 16 Jul 2004 00:56:22 -0000
@@ -20,6 +20,8 @@
(match_io): Reformat error message.
(match_inquire_element): Call match_out_tag where appropriate.
+ * parse.c (gfc_check_do_variable): Fix error locus.
+
2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
PR fortran/15129
Index: fortran/parse.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fortran/parse.c,v
retrieving revision 1.14
diff -u -p -r1.14 parse.c
--- fortran/parse.c 16 Jul 2004 00:39:40 -0000 1.14
+++ fortran/parse.c 16 Jul 2004 00:56:22 -0000
@@ -1926,7 +1926,7 @@ gfc_check_do_variable (gfc_symtree *st)
if (s->do_variable == st)
{
gfc_error_now("Variable '%s' at %C cannot be redefined inside "
- "loop beginning at %L", st->name, &s->tail->loc);
+ "loop beginning at %L", st->name, &s->head->loc);
return 1;
}