This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gfortran] Assorted matching fixes, fix No 1 from PR16404


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;
       }




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]