This is the mail archive of the gcc-patches@gcc.gnu.org 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: Defining effective targets in testsuite framework


On Fri, Jun 03, 2005 at 05:09:26PM +0200, François-Xavier Coudert wrote:
> Hi all,
> 
> I have finished designing a patch for I/O support of large integer and
> real kinds in gfortran (hope to submit it for review early next week).
> I am now preparing the testcases to go with it. Those testcases will
> only have to run on targets matching certain properties (such as
> supporting those large kinds). On a unrelated topic (recent /dev/null
> failures), Paul Brook suggested I defined an "effective target", with
> code to determine whether a given target should or shouldn't belong to
> it. I think I must do something like that for my testcases as well.
> 
> Given that I don't know much about those things, can someone give me
> the basics (or a link pointing to explaining doc) about "effective
> targets" in the dejagnu framework. How do I define one, and the use
> it? Of course, pointers to examples of this in the existing GCC
> codebase would be welcome!

Effective-target keywords are specific to the GCC testsuite and are
defined in gcc/testsuite/lib/target-supports.exp via procedures
check_effective_target_<keyword>.  some of them use a list of specific
targets, others compile or run small programs to determine whether a
feature is available.

The keyword can be used in dg-require-effective-target or in a selector
expression, as documented in the GCC Internals manual section "Test
Directives" (source in gcc/doc/sourcebuild.texi).  Examples of the use
of effective-target keywords in actual tests:

/* { dg-do run { target { powerpc*-*-* && lp64 } } } */

/* { dg-require-effective-target sync_int_long } */

/* { dg-options "-march=pentium3" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */

/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { lp64 || vect_no_align } } } } */

Janis


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