This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: dg-skip-if was Re: gcc 4.3.0 i386 default question
On Fri, 2008-03-14 at 10:18 -0500, Joel Sherrill wrote:
> /* { dg-skip-if "" { *-*-* } { "-mcpu=405" } { "-mcpu=" } } */
>
> I think this is doing what we want it to. It looks like it results
> the tests getting run when -mcpu=405 and excluded when
> -mcpu=603e is set on the board cflags.
The test directives are documented in the internals manual. From
sourcebuild.texi:
@item @{ dg-skip-if @var{comment} @{ @var{selector} @}
@{ @var{include-opts} @} @{ @var{exclude-opts} @} @}
Skip the test if the test system is included in @var{selector} and if
each of the options in @var{include-opts} is in the set of options with
which the test would be compiled and if none of the options in
@var{exclude-opts} is in the set of options with which the test would be
compiled.
The directive above says to skip the test on any target when
"-mcpu=450" is used and "-mcpu=" is not used. You'd actually
want "-mcpu=*", since "-mcpu=" isn't a full option, but then
the test will never be skipped whenever -mcpu=* is used.
Proc check_conditional_xfail from framework.exp in DejaGnu
processes the lists of included and excluded option and with
"--verbose --verbose" in RUNTESTFLAGS will print messages to
the test log (e.g. obj_dir/gcc/testsuite/gcc/gcc.log) about
its progress.
I think that dg-skip-if won't do what you need and you'll need
to add effective-target keywords.
Janis