public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* dg-skip-if usage problem
@ 2004-11-28 22:27 Hans-Peter Nilsson
  2004-11-29 18:10 ` Janis Johnson
  0 siblings, 1 reply; 4+ messages in thread
From: Hans-Peter Nilsson @ 2004-11-28 22:27 UTC (permalink / raw)
  To: gcc; +Cc: Janis Johnson

I'm trying to skip the faulty gcc.dg/20040813-1.c for MMIX (see
PR target/18336).  It seems dg-skip-if should let me do that:
"Skip the test (report it as UNSUPPORTED) if the target list and
included flags are matched and the excluded flags are not
matched" but I don't know how how to use it, and existing usage
doesn't give me a working clue.  For example these permutations
don't work:
/* { dg-skip-if "" { mmix-*-* } { "" } { "" } } */
/* { dg-skip-if "" { mmix-*-* } { "" } { "-c" } } */
/* { dg-skip-if "" { mmix-*-* } { "-c" } { "" } } */
/* { dg-skip-if "" { mmix-*-* } { "-c" } { "-c" } } */
(plus some variants with "no-such-option").  Better would be
to add a dg-require-stabs, of course, but I still need a way to
skip a test, and I'm not happy with just xfailing it: "xfail" is
not "unsupported".

Help?

brgds, H-P

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: dg-skip-if usage problem
  2004-11-28 22:27 dg-skip-if usage problem Hans-Peter Nilsson
@ 2004-11-29 18:10 ` Janis Johnson
  2004-11-29 20:32   ` Hans-Peter Nilsson
  0 siblings, 1 reply; 4+ messages in thread
From: Janis Johnson @ 2004-11-29 18:10 UTC (permalink / raw)
  To: Hans-Peter Nilsson; +Cc: gcc, Janis Johnson

On Sun, Nov 28, 2004 at 04:56:39PM -0500, Hans-Peter Nilsson wrote:
> I'm trying to skip the faulty gcc.dg/20040813-1.c for MMIX (see
> PR target/18336).  It seems dg-skip-if should let me do that:
> "Skip the test (report it as UNSUPPORTED) if the target list and
> included flags are matched and the excluded flags are not
> matched" but I don't know how how to use it, and existing usage
> doesn't give me a working clue.  For example these permutations
> don't work:
> /* { dg-skip-if "" { mmix-*-* } { "" } { "" } } */
> /* { dg-skip-if "" { mmix-*-* } { "" } { "-c" } } */
> /* { dg-skip-if "" { mmix-*-* } { "-c" } { "" } } */
> /* { dg-skip-if "" { mmix-*-* } { "-c" } { "-c" } } */
> (plus some variants with "no-such-option").  Better would be
> to add a dg-require-stabs, of course, but I still need a way to
> skip a test, and I'm not happy with just xfailing it: "xfail" is
> not "unsupported".
> 
> Help?

To skip a test for a list of targets regardless of options, do

/* { dg-skip-if "" { mmix-*-* } { "*" } { "" } } */

The option list compared against doesn't include "-c", which is
added when actually compiling the test.

Janis

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: dg-skip-if usage problem
  2004-11-29 18:10 ` Janis Johnson
@ 2004-11-29 20:32   ` Hans-Peter Nilsson
  2004-11-29 21:42     ` Janis Johnson
  0 siblings, 1 reply; 4+ messages in thread
From: Hans-Peter Nilsson @ 2004-11-29 20:32 UTC (permalink / raw)
  To: Janis Johnson; +Cc: gcc

On Mon, 29 Nov 2004, Janis Johnson wrote:
> To skip a test for a list of targets regardless of options, do
>
> /* { dg-skip-if "" { mmix-*-* } { "*" } { "" } } */

Oh it's a glob!  Big doh, I should've guessed.

Hmm, dg-skip-if *does* work (for example, the line above), but
*only if it's put on a line after the dg-do line*!  I think
that's where I failed.

Thanks!

> The option list compared against doesn't include "-c", which is
> added when actually compiling the test.

According to "-v -v -v" (verbose level 3), "-c" is one of the
options tested against (which was the reason I used that of
course. ;-)  I can s/"*"/"-c"/ above and it still works.

BTW, how do you feel about respectively a dg-require-fpic
(target must support -fpic/fPIC) and dg-require-stabs
(target must support the STABS debug format)?

"Too many dg-require-*" or "send a patch"?

brgds, H-P

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: dg-skip-if usage problem
  2004-11-29 20:32   ` Hans-Peter Nilsson
@ 2004-11-29 21:42     ` Janis Johnson
  0 siblings, 0 replies; 4+ messages in thread
From: Janis Johnson @ 2004-11-29 21:42 UTC (permalink / raw)
  To: Hans-Peter Nilsson; +Cc: Janis Johnson, gcc

On Mon, Nov 29, 2004 at 03:06:52PM -0500, Hans-Peter Nilsson wrote:
> On Mon, 29 Nov 2004, Janis Johnson wrote:
> > To skip a test for a list of targets regardless of options, do
> >
> > /* { dg-skip-if "" { mmix-*-* } { "*" } { "" } } */
> 
> Oh it's a glob!  Big doh, I should've guessed.
> 
> Hmm, dg-skip-if *does* work (for example, the line above), but
> *only if it's put on a line after the dg-do line*!  I think
> that's where I failed.

Yeah, I'm planning to document this stuff to warn about things like
that.  GCC-specific dg- directives can override things set up by the
dg- directives from DejaGnu, but not the other way around.

> BTW, how do you feel about respectively a dg-require-fpic
> (target must support -fpic/fPIC) and dg-require-stabs
> (target must support the STABS debug format)?
> 
> "Too many dg-require-*" or "send a patch"?

Support "fpic" and "stabs" as new effective-target keywords recognized
by dg-require-effective-target; the more the merrier as far as I'm
concerned.

See http://gcc.gnu.org/ml/gcc-patches/2004-11/msg01507.html for my
proposal to use those keywords in more places where target lists are
now used.

Janis

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-11-29 20:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-28 22:27 dg-skip-if usage problem Hans-Peter Nilsson
2004-11-29 18:10 ` Janis Johnson
2004-11-29 20:32   ` Hans-Peter Nilsson
2004-11-29 21:42     ` Janis Johnson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).