summaryrefslogtreecommitdiff
path: root/gcc/testsuite/lib/gfortran-dg.exp
diff options
context:
space:
mode:
authortobi <tobi@138bc75d-0d04-0410-961f-82ee72b054a4>2005-02-21 16:31:42 +0000
committertobi <tobi@138bc75d-0d04-0410-961f-82ee72b054a4>2005-02-21 16:31:42 +0000
commit0e1659a2c609380a9a822400160b35e60d324c53 (patch)
treed4f0e5dc6da3229ff73476d01cc2ca587c701d44 /gcc/testsuite/lib/gfortran-dg.exp
parent045fbdee30b81a22d85fcdcf878e51a19c246c50 (diff)
downloadgcc-0e1659a2c609380a9a822400160b35e60d324c53.tar.gz
Fix law's ChangeLog date, and
* lib/gfortran-dg.exp (gfortran-dg-test): Split long regexps. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@95335 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/lib/gfortran-dg.exp')
-rw-r--r--gcc/testsuite/lib/gfortran-dg.exp13
1 files changed, 11 insertions, 2 deletions
diff --git a/gcc/testsuite/lib/gfortran-dg.exp b/gcc/testsuite/lib/gfortran-dg.exp
index d6887b050e2..247df02bd0c 100644
--- a/gcc/testsuite/lib/gfortran-dg.exp
+++ b/gcc/testsuite/lib/gfortran-dg.exp
@@ -55,8 +55,17 @@ proc gfortran-dg-test { prog do_what extra_tool_flags } {
# [name]:[line2]: Error: Some error at (1) and (2)
# We proceed in two steps: first we deal with the form with two
# different locus lines, then with the form with only one locus line.
- regsub -all " In file (\[^\n\]*)\n\n\[^\n\]*\n\[^\n\]*\n In file (\[^\n\]*)\n\n\[^\n\]*\n\[^\n\]*\n(\[^\n\]*)\n" $comp_output "\\1: \\3\n\\2: \\3\n" comp_output
- regsub -all " In file (\[^\n\]*)\n\n\[^\n\]*\n\[^\n\]*\n(\[^\n\]*)\n" $comp_output "\\1: \\2\n" comp_output
+ #
+ # Note that these regexps only make sense in the combinations used below.
+ # Note also that is imperative that we first deal with the form with
+ # two loci.
+ set locus_regexp " In file (\[^\n\]*)\n\n\[^\n\]*\n\[^\n\]*\n"
+ set diag_regexp "(\[^\n\]*)\n"
+
+ set two_loci "$locus_regexp$locus_regexp$diag_regexp"
+ set single_locus "$locus_regexp$diag_regexp"
+ regsub -all $two_loci $comp_output "\\1: \\3\n\\2: \\3\n" comp_output
+ regsub -all $single_locus $comp_output "\\1: \\2\n" comp_output
return [list $comp_output $output_file]
}