[committed] Fix mips-linux-gnu mips.exp failures

Richard Sandiford rsandifo@nildram.co.uk
Sun Sep 23 09:34:00 GMT 2007


Uros Bizjak <ubizjak@gmail.com> writes:
>> This patch therefore adds a new mips16_attribute target selector.
>> It also adds a new dg-add-options feature that tries to add options
>> that enable MIPS16 code generation (-mno-abicalls -fno-pic).  Thus
>> normal mips-linux-gnu tests do run the compile-only MIPS16 tests
>> but, for example, --target_board unix/-fpic doesn't.
>>
>>
>> gcc/testsuite/
>> 	* lib/target-supports.exp (add_options_for_mips16_attribute)
>> 	(check_effective_target_mips16_attribute): New functions.
>
> Should we move mips specific procedures (i.e. 
> check_effective_target_mpaired_single, check_effective_target_mips64 and 
> new add_options_for_mips16_attribute and 
> check_effective_target_mips16_attribute) from lib/target-supports.exp to 
> gcc.target/mips/mips.exp? i386 has its private check_effective_target_* 
> procedures defined in gcc.target/i386/i386.exp and it works just fine.

I don't think that'd work.  We need to use mpaired_single when testing
whether vector operations are supported, which is done in vect.exp and
fortran-torture.exp rather than mips.exp.  We need mips64 to skip tests
in gcc.dg, not gcc.target/mips.  Given that, I'd rather not try to think
too hard about whether a specific procedure -- mips16_attribute in this
case -- can really be made local to mips.exp.  It seems less confusing
if all the valid target selectors are defined in one place, and are
made available throughout the testsuite.  (For example, I notice that
i386.exp doesn't take any measures to undefine the local procedures
afterwards, so they remain available for later testsuites.  It would
be easy to accidentally introduce a use into a later non-i386.exp
testcase, and thus break that test when run individually.)

Skips, xfails, dg-options, etc., will often depend on target-specific
conditions, and I think it's resonable that the best way of testing for
some conditions is going to be to have a target-specific selector.

Richard



More information about the Gcc-patches mailing list