This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
[gfortran, testsuite] Don't give excess errors for multiple locion the same line Was: Re: Need help with testsuite program
Tobias Schlüter wrote:
> Unfortunately this won't work, because the regexp which eats the fancy error
> messages can only deal with a single locus, even if they're on the same line.
> I found this out, by changing your patch to only print a single locus.
>
> I see two possible ways of fixing this:
> 1. fix the regexp
Actually this wasn't hard at all. Instead of skipping spaces and an
arbitrary-digit number (which doesn't make sense anyway), with this patch we
completely skip the locus line. This doesn't yet fix the case where two loci
on different lines are printed, because I don't know regexps too well, and
instead of delaying this for a complete solution which will take me a while,
this cures the immediate problem.
Ran the gfortran testsuite with this patch and no regressions. If we weren't
in stage3 I'd commit this as obvious, but since I don't want to take the
slightest risk of breaking something, I'm asking for explicit approval. Ok?
NB gfortran error messages look like this:
---
In file name.f90:1
ad\xC3\xB6sgh
1 2
Error: Weirdness at (1) and (2)
---
- Tobi
2005-02-20 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
* lib/gfortran-dg.exp (gfortran-dg-test): Eat locus line no matter
what it looks like.
Index: gfortran-dg.exp
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/lib/gfortran-dg.exp,v
retrieving revision 1.3
diff -u -p -r1.3 gfortran-dg.exp
--- gfortran-dg.exp 16 Jul 2004 00:32:26 -0000 1.3
+++ gfortran-dg.exp 20 Feb 2005 16:58:36 -0000
@@ -29,7 +29,7 @@ proc gfortran-dg-test { prog do_what ext
# FIXME: Add a colon after line number
# Remove the line of source code with the error and
# the number pointing to error
- regsub -all "\n\n\[^\n\]*\n *\[0-9\]*\n" $comp_output ": " comp_output
+ regsub -all "\n\n\[^\n\]*\n\[^\n\]*\n" $comp_output ": " comp_output
return [list $comp_output $output_file]
}