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: Testsuite adaptions for the avr target / nested function support

On Tue, Feb 22, 2005 at 11:00:12PM +0100, Björn Haase wrote:
> Hi,
> find enclosed the first of a to-be-series of adaptions of the testsuite to 
> accomodate for particularities of the avr target. Presently there are about 
> 500 reported bugs, most of which are actually not real bugs.
> Since this is the first patch I am posting here, I decided to start with a 
> really tiny one first. Mainly, in order to make sure that the formal 
> requirements (change log entries, etc., coding style of dg magic comments, 
> etc.) of the remaining adaptions will be compliant with gcc coding 
> guidelines).

See other ChangeLog entries for examples.  In particular: two spaces
between name and address; list each file on a line that starts with tab,
"* ", filename relative to the ChangeLog (in this case relative to
gcc/testsuite); briefly describe what changed, not why (that does into
the patch email message).  Use the current date in the patch mail and
fix it when checking in the patch.

If a target fails a test because of a bug in GCC for that target, XFAIL
the test and open a PR in Bugzilla that describes the bug.  If a target
fails a test because of limitations that are not expected to change,
skip the test rather than marking it XFAIL, and add a comment to the test
telling why it's being skipped for a particular target.  If the reason
for skipping or xfailing a test applies to multiple targets, define an
effective-target keyword for it and use that in the skip or xfail list
instead of the target-triplet or with dg-require-effective-target.

Instead of adding dg-do to XFAIL a test that doesn't already use that
directive, use dg-xfail-if instead.  For example, in 20010327-1.c you'd

/* { dg-xfail-if "" { "avr-*-*" } { "*" } { ""} } */

If you see an out-of-date comment then propose removing it, like the one
just before your change in gcc.c-torture/compile/20010237-1.c.
> I presently observe that the vast majority of the huge number of failures 
> stems from the lacking support of nested functions. Avr has separate program 
> memory and data memory spaces and does, thus, not support trampolines. This 
> will be the most important task in order to actually avoid that the real bugs 
> remain hidden behind a huge number of false alarms. 
> Therefore my question: Is there any switch that allows for disabling all test 
> cases that make use of nested functions? If not: Is this what the 
> NO_TRAMPLINES define symbols are supposed to be used for or should one define 
> a "dg-require-support" tag for this purpose? Possibly one distinguish between 
> ordinary nested functions that are used only locally and nested functions 
> whose address is passed to other functions (i.e. real trampoline code)?

The tests that use #ifdef NO_TRAMPOLINES are essentially skipped when
that's true although they're reported as PASS.  For similar tests I'd
recommend a new effective-target keyword "trampolines".  To skip tests
with any nested function, perhaps a keyword "nested_functions".  Adding
effective targets instead of dg-support-whatever lets you use the
keywords in selection lists with other target triplets and with options,
providing more flexibility.


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