This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: RTEMS FORTRAN Pattern Failures
- From: Joel Sherrill <joel dot sherrill at oarcorp dot com>
- To: Tobias Burnus <burnus at net-b dot de>, Andreas Schwab <schwab at suse dot de>
- Cc: GCC Mailing List <gcc at gcc dot gnu dot org>
- Date: Mon, 12 Jan 2015 15:33:00 -0600
- 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> <54B43A2B dot 8090901 at net-b dot de>
On 1/12/2015 3:18 PM, Tobias Burnus wrote:
> 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).
That should be this:
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" };'
>> 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.
:) I wondered about that when I started this thread. I almost compressed the
files I attached to avoid mailer issues.
>> 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)?
I tried it and it didn't work. :(
> Tobias
--
Joel Sherrill, Ph.D. Director of Research & Development
joel.sherrill@OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985