This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: RTEMS FORTRAN Pattern Failures
- From: Tobias Burnus <burnus at net-b dot de>
- To: Joel Sherrill <joel dot sherrill at oarcorp dot com>, Andreas Schwab <schwab at suse dot de>
- Cc: GCC Mailing List <gcc at gcc dot gnu dot org>
- Date: Mon, 12 Jan 2015 22:18:35 +0100
- Subject: Re: RTEMS FORTRAN Pattern Failures
- Authentication-results: sourceware.org; auth=none
- References: <54B3F33D dot 7030207 at oarcorp dot com> <mvmy4p855dh dot fsf at hawking dot suse dot de> <54B3FAD5 dot 3080709 at oarcorp dot com> <54B41D06 dot 7050606 at net-b dot de> <54B42EB0 dot 3060007 at oarcorp dot com> <54B43374 dot 80406 at net-b dot de> <54B436D2 dot 1030004 at oarcorp dot com>
Hi Joel,
Am 12.01.2015 um 22:04 schrieb Joel Sherrill:
That was very close.
cat out.txt | \
perl -e '$in = join("", <STDIN>); if ($in =~ m/^1 2 3(\n|\r\n|\r)1 2
3(\n|\r\n|\r)((\n|\r\n|\r)\*\*\* EXIT code 0)(\n|\r\n|\r)?$/s) { print
"matched\n" } else { print "not matched\n" };'
That won't work on systems which don't print EXIT. You have to move the
")" from after the "0" to before the "?" to make the whole part as
optional (the ? applies to the preceding token).
I think I mainly fixed the first line to have two spaces between the 2 and 3
and added another the EOL pattern at the end.
The former was a bug (feature) of Thunderbird, which ate the second
space, the second, I forgot.
That just leaves translating that back into DejaGNU/Expect. :)
Well, that's simple: Either remove all "dg-output" from the test case
and add the string between "m/" and "/s" instead of ... in
C { dg-output "..." }
You additionally have to change "\*" to "\\*" and "$" to "\$".
Or, alternatively, only modify the last "dg-output" by replacing "\$" by
the string starting with "((" and ending with "$". (Again, you have to
replace \* by \\* and $ by \$.)
That should be all. I wonder whether that now works or still fails.
Can you try whether this works (see attachment)?
Tobias
diff --git a/gcc/testsuite/gfortran.dg/g77/f77-edit-x-out.f b/gcc/testsuite/gfortran.dg/g77/f77-edit-x-out.f
index 13a9d7a..4aacd4d 100644
--- a/gcc/testsuite/gfortran.dg/g77/f77-edit-x-out.f
+++ b/gcc/testsuite/gfortran.dg/g77/f77-edit-x-out.f
@@ -8,5 +8,5 @@ C { dg-output "^" }
write(*,'(I1,1X,I1,2X,I1)') 1,2,3 ! { dg-output "1 2 3(\n|\r\n|\r)" }
C Section 13.5.3 explains why there are no trailing blanks
write(*,'(I1,1X,I1,2X,I1,3X)') 1,2,3 ! { dg-output "1 2 3(\n|\r\n|\r)" }
-C { dg-output "\$" }
+C { dg-output "((\n|\r\n|\r)\\*\\*\\* EXIT code 0(\n|\r\n|\r))?\$" }
end