This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] fix for "FAIL: g++.jason/thunk3.C" in gcc testsuite


Nick Clifton <nickc@redhat.com> writes:
>> I got that error
>> after running "cvs update" to pull in your change.  As you can see,
>> the message is complaining about "m32r*-*".
>
> This is very strange.  I definitely do not get this error and I 
> definitely  did run the testsuite.  In fact the reason that I made the 
> change to Kazuhiro's original patch was because my testing showed that 
> his change did not actually work.  (For me).  I traced this down to the 
> fact that the target string being checked was "m32r-sim".  I guess in 
> hindsight I should have worried about why this was not 
> "m32r-unknown-sim" but at the  time it just seemed obvious that only one 
> dash in the target string was necessary.  So I changed the selector to 
> "m32r*-*", re ran the testsuite, found that the thunk3.C test was now an 
> expected failure and so I checked the patch in.

Fair enough.  It sounds like you've been very methodical here.

>> The point is that target selectors work on the _canonical_ target
>> name, not the target alias.  So if you're testing --target=mips-elf,
>> the target selector will match the canonical target (mips-unknown-elf),
>> not the shortened form.  The same would go for "m32r-sim" as well.
>> In summary, I think Kazuhiro's patch was correct as posted.
>
> I think that these problems must be down to different versions of 
> dejagnu, or maybe expect.  I have version 1.4.2 of dejagnu and 5.38.0 of 
> expect installed on my system and in my gcc source tree I have symbolic 
> links to the dejagnu and expect sources in the binutils mainline. (1.4.2 
> and 5.26.0 respectively).

For the record, I'm using dejagnu 1.4.4 (FSF release) and expect 5.42.1.

I can't explain the difference either.  The code that checks for the
target triplet is in dg.exp:dg-process-target:

proc dg-process-target { selector } {
    ...
    if [regexp "^${what}( \[^ \]+-\[^ \]+-\[^ \]+| native)+$" $selector] {
        ...
    } else {
	error "syntax error in target selector \"$selector\""
    }
    ...
}

It's clearly supposed to enforce the "three component" rule that
I mentioned in my first mail.

This code appears to be the same in both versions of dejagnu.  In fact
the only differences in dg.exp seem to be related to comments or to
the removal of trailing ";"s.

The gcc testsuite does override dg-process-target with its own
definition (see lib/target-supports-dg.exp), but it calls back to the
dg.exp version for standard target selectors.  I can't see anything in
the gcc definition that would explain the difference.

FWIW, a spot check of the latest 4.1 gcc-testresults seems to suggest
that "everyone else" is experiencing the same error.  For example, the
five most recent results at the time of writing are:

    http://gcc.gnu.org/ml/gcc-testresults/2005-05/msg01389.html
    http://gcc.gnu.org/ml/gcc-testresults/2005-05/msg01386.html
    http://gcc.gnu.org/ml/gcc-testresults/2005-05/msg01384.html
    http://gcc.gnu.org/ml/gcc-testresults/2005-05/msg01383.html
    http://gcc.gnu.org/ml/gcc-testresults/2005-05/msg01382.html

Richard


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]