Migrating gcc.c-torture

Bernd Schmidt bernds@codesourcery.com
Fri Aug 22 12:19:00 GMT 2014


On 07/29/2014 12:36 AM, Joseph S. Myers wrote:
> On Thu, 24 Jul 2014, Jakub Jelinek wrote:
>> Yeah.  I believe gcc.c-torture/compile/ has been converted already,
>> so it is just about gcc.c-torture/execute/.  Each of these tests has
>> it's own default idioms, e.g. -w in by default in gcc.c-torture/.

Using -w does not strike me as a feature - ideally we'd like to know if 
we produce new warnings. Almost all of the existing warnings could be 
shut up by adding declarations of abort and exit.

>> So, please just tweak execute.exp, so that it does what it did until now
>> (perhaps with the exception of *.x files support) in dg framework, and
>> convert *.exp files into dg-* directives in the testcases.
>
> And note that this is bug 20567.  Existing dg-* directive uses in
> gcc.c-torture/execute/ (which are currently ignored) may or may not be
> correct, so they should be reviewed as part of such a migration to decide
> whether they should stay or be removed.  (There aren't that many of them
> to review.)

Here's another attempt. I've used a global default of "-w" as in 
c-torture/compile; in testcases that use dg-options (overriding this 
default) I've usually added in declarations of abort and exit to shut up 
the warnings.

Some notes about testcases where the conversion wasn't straightforward:

931004-12.c:
     # xfail this on powerpc-*-darwin, see PR 15923
In the PR, we first see a note that the test has been xfailed, then 
later we see a "Fixed". I've decided not to keep the xfail.

cvt-1.c:
Has a dubious comment about the test failing on d10v without 32 bit 
ints. Since that would indicate a bug in the target, and the target was 
removed anyway (or never added - can't find any other mention of it), 
decided not to keep the xfail.

20030125-1.x:
Uses a test for *linux*, *gnu* or uclibc to identify whether the target 
supports C99 library functions. Replaced with require-effective-target 
c99_runtime.

990413-2.c:
Says the test is x86 specific. Not moved to gcc.target however, in order 
to keep it running with all torture options.

20111227-[23].c:
Wants to examing optimizer log files (which presumably doesn't do 
anything when run in current c-torture), and wants to run at only one 
optimization level. Moved to gcc.dg and added -free since it is not 
enabled at -O.

20010129-1.c:
Has some tcl code that modifies options on i686 based on whether -m64 is 
specified. As a translation I've used
/* { dg-options "-mtune-i686" { target { { i?86*-*-* } && ilp32 } } } */
which I think should do the same thing.

920710-1.x:
Claims h8300 does not have long long. The .x file predates a checkin 
that makes LONG_LONG_TYPE_SIZE 64 on h8300. Decided not to keep this.

pr53366-1.x:
No corresponding test exists (there are tests with that name in 
dg/torture and target/i386).

These are the changes on x86_64-linux:

                 === gcc Summary ===

-# of expected passes           199892
+# of expected passes           199844
  # of unexpected failures       247
  # of unexpected successes      54
  # of expected failures         526
-# of unsupported tests         3487
+# of unsupported tests         3495

Ok?


Bernd
-------------- next part --------------
A non-text attachment was scrubbed...
Name: execute.diff
Type: text/x-patch
Size: 66237 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20140822/d7820dc5/attachment.bin>


More information about the Gcc-patches mailing list