This is the mail archive of the 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: dg-skip-if was Re: gcc 4.3.0 i386 default question

On Fri, 2008-03-14 at 10:21 -0700, Janis Johnson wrote:
> 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.

On the other hand, to run a test for -mcpu=450 but no other -mcpu
option, this very ugly directive works (pattern matching is done
with globs):

/* { dg-skip-if "" { *-*-* } { "" } { "-mcpu=[0-35-9][0-46-9][1-9]*" } } */

That kind of thing could get ugly very quickly if there are
multiple cpus that would work.

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