This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: DejaGNU test case assistance please?
- From: Janis Johnson <janis187 at us dot ibm dot com>
- To: Kean Johnston <jkj at sco dot com>
- Cc: gcc mailing list <gcc at gcc dot gnu dot org>
- Date: Fri, 7 Oct 2005 11:03:02 -0700
- Subject: Re: DejaGNU test case assistance please?
- References: <4346329D.8060603@sco.com>
On Fri, Oct 07, 2005 at 01:32:29AM -0700, Kean Johnston wrote:
> Is there a way to exclude specific line tests based on
> target switches? Something like dg-skip-if? Or perhaps
> thats the right think to use (but all the examples I
> have seen seem to skip the entire test case).
You're in luck! dg-warning and similar directives can be skipped or
xfailed for particular targets, but those don't take options into
account. There is, however, an effective-target keyword for fpic.
The directives used in the GCC testsuite, along with effective-target
keywords and target/xfail selectors, are documented at
http://gcc.gnu.org/onlinedocs/gccint/Test-Directives.html.
> For example, in gcc.dg/assign-warn-3.c, how would I
> ignore the check for a warning if -fPIC is used?
>
> Any help greatly appreciated.
Something like
{ dg-warning "regexp" { "" { target { ! fpic } } } }
If it should only be ignored for fpic for particular targets you
can specify that in the target selector.
Janis