diff options
author | mikael <mikael@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-12-15 14:46:22 +0000 |
---|---|---|
committer | mikael <mikael@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-12-15 14:46:22 +0000 |
commit | a220f54725e529a6cc08999c259b1bb3171134e4 (patch) | |
tree | 8811a443c65444ec2cbe37ad951a4e338f1821f5 | |
parent | 3b14a2e602092924efaf923d138577646e11ea40 (diff) | |
download | gcc-a220f54725e529a6cc08999c259b1bb3171134e4.tar.gz |
2008-12-15 Mikael Morin <mikael.morin@tele2.fr>
PR fortran/38113
* error.c (show_locus): Start counting columns at 0.
* primary.c (match_actual_arg): Eat spaces
before copying the current locus.
(match_variable): Copy the locus before matching.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@142763 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/fortran/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/fortran/error.c | 10 | ||||
-rw-r--r-- | gcc/fortran/primary.c | 3 |
3 files changed, 11 insertions, 10 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index ad494810dcc..7b50b8c0a93 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,11 @@ +2008-12-15 Mikael Morin <mikael.morin@tele2.fr> + + PR fortran/38113 + * error.c (show_locus): Start counting columns at 0. + * primary.c (match_actual_arg): Eat spaces + before copying the current locus. + (match_variable): Copy the locus before matching. + 2008-12-14 Paul Thomas <pault@gcc.gnu.org> PR fortran/35937 diff --git a/gcc/fortran/error.c b/gcc/fortran/error.c index a7005e9fbb6..29efbd1fee0 100644 --- a/gcc/fortran/error.c +++ b/gcc/fortran/error.c @@ -307,14 +307,6 @@ show_locus (locus *loc, int c1, int c2) offset = 0; - /* When the loci is not associated with a column, it will have a - value of zero. We adjust this to 1 so that it will appear. */ - - if (c1 == 0) - c1 = 1; - if (c2 == 0) - c2 = 1; - /* If the two loci would appear in the same column, we shift '2' one column to the right, so as to print '12' rather than just '1'. We do this here so it will be accounted for in the @@ -361,7 +353,7 @@ show_locus (locus *loc, int c1, int c2) c1 -= offset; c2 -= offset; - for (i = 1; i <= cmax; i++) + for (i = 0; i <= cmax; i++) { if (i == c1) error_char ('1'); diff --git a/gcc/fortran/primary.c b/gcc/fortran/primary.c index 032fa9024b4..c7ca861a273 100644 --- a/gcc/fortran/primary.c +++ b/gcc/fortran/primary.c @@ -1360,6 +1360,7 @@ match_actual_arg (gfc_expr **result) gfc_expr *e; char c; + gfc_gobble_whitespace (); where = gfc_current_locus; switch (gfc_match_name (name)) @@ -2820,10 +2821,10 @@ match_variable (gfc_expr **result, int equiv_flag, int host_flag) || gfc_current_state () == COMP_CONTAINS) host_flag = 0; + where = gfc_current_locus; m = gfc_match_sym_tree (&st, host_flag); if (m != MATCH_YES) return m; - where = gfc_current_locus; sym = st->n.sym; |