* Re: Migrating gcc.c-torture
2014-07-28 22:41 ` Joseph S. Myers
@ 2014-08-22 12:19 ` Bernd Schmidt
2014-08-22 20:39 ` Mike Stump
2014-09-05 10:10 ` Thomas Schwinge
0 siblings, 2 replies; 16+ messages in thread
From: Bernd Schmidt @ 2014-08-22 12:19 UTC (permalink / raw)
To: Joseph S. Myers, Jakub Jelinek; +Cc: Andrew Pinski, GCC Patches
[-- Attachment #1: Type: text/plain, Size: 3166 bytes --]
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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: execute.diff --]
[-- Type: text/x-patch; name="execute.diff", Size: 66237 bytes --]
diff --git a/gcc/testsuite/gcc.c-torture/execute/20010122-1.c b/gcc/testsuite/gcc.c-torture/execute/20010122-1.c
index 280e3d4..14269fa 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20010122-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20010122-1.c
@@ -1,3 +1,4 @@
+/* { dg-skip-if "requires frame pointers" { *-*-* } "-fomit-frame-pointer" "" } */
extern void exit (int);
extern void abort (void);
diff --git a/gcc/testsuite/gcc.c-torture/execute/20010122-1.x b/gcc/testsuite/gcc.c-torture/execute/20010122-1.x
deleted file mode 100644
index 6558236..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/20010122-1.x
+++ /dev/null
@@ -1,11 +0,0 @@
-# This test relies on __builtin_return_address(1) returning something
-# useful or NULL. This is not guaranteed to be be so, especially when
-# -fomit-frame-pointer is used. So do not test with it.
-
-set torture_eval_before_compile {
- if {[string match {*-fomit-frame-pointer*} "$option"]} {
- continue
- }
-}
-
-return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/20010129-1.c b/gcc/testsuite/gcc.c-torture/execute/20010129-1.c
index a4ea5e4..0586577 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20010129-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20010129-1.c
@@ -1,3 +1,5 @@
+/* { dg-options "-mtune-i686" { target { { i?86*-*-* } && ilp32 } } } */
+
long baz1 (void *a)
{
static long l;
diff --git a/gcc/testsuite/gcc.c-torture/execute/20010129-1.x b/gcc/testsuite/gcc.c-torture/execute/20010129-1.x
deleted file mode 100644
index 7e474c4..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/20010129-1.x
+++ /dev/null
@@ -1,13 +0,0 @@
-# Use "-mtune=i686" on i?86-*-* unless "-m64" is specified.
-if { [istarget "i?86-*-*"] } {
- set target_name [target_info name]
- if {[board_info $target_name exists multilib_flags]} {
- set multilib_flags [board_info $target_name multilib_flags]
- if { ![regexp -- "-m64" $multilib_flags] } {
- set additional_flags "-mtune=i686"
- }
- } else {
- set additional_flags "-mtune=i686"
- }
-}
-return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/20020404-1.c b/gcc/testsuite/gcc.c-torture/execute/20020404-1.c
index dc62b15..fe5ea14 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20020404-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20020404-1.c
@@ -1,3 +1,5 @@
+/* { dg-require-effective-target int32plus } */
+/* { dg-skip-if "pointers can be truncated" { m32c-*-* } "*" "" } */
/* Extracted from GDB sources. */
typedef long long bfd_signed_vma;
diff --git a/gcc/testsuite/gcc.c-torture/execute/20020404-1.x b/gcc/testsuite/gcc.c-torture/execute/20020404-1.x
deleted file mode 100644
index e4fd61a..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/20020404-1.x
+++ /dev/null
@@ -1,15 +0,0 @@
-load_lib target-supports.exp
-
-if { [check_effective_target_int16] } {
- return 1
-}
-
-# m32c pointers can be 24 bits in a 32 bit variable, so the test
-# patterns may get truncated.
-if { [istarget "m32c-*-*"] } {
- return 1
-}
-
-
-return 0
-
diff --git a/gcc/testsuite/gcc.c-torture/execute/20021024-1.c b/gcc/testsuite/gcc.c-torture/execute/20021024-1.c
index f7d98e9..93504f2 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20021024-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20021024-1.c
@@ -1,4 +1,5 @@
/* Origin: PR target/6981 from Mattias Engdegaard <mattias@virtutech.se>. */
+/* { dg-require-effective-target int32plus } */
void exit (int);
void abort (void);
diff --git a/gcc/testsuite/gcc.c-torture/execute/20021024-1.x b/gcc/testsuite/gcc.c-torture/execute/20021024-1.x
deleted file mode 100644
index 121fcfe..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/20021024-1.x
+++ /dev/null
@@ -1,7 +0,0 @@
-load_lib target-supports.exp
-
-if { [check_effective_target_int16] } {
- return 1
-}
-
-return 0;
diff --git a/gcc/testsuite/gcc.c-torture/execute/20021127-1.c b/gcc/testsuite/gcc.c-torture/execute/20021127-1.c
index 0b3ff9a..204305b 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20021127-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20021127-1.c
@@ -1,3 +1,5 @@
+/* { dg-options "-std=c99" } */
+
long long a = -1;
long long llabs (long long);
void abort (void);
diff --git a/gcc/testsuite/gcc.c-torture/execute/20021127-1.x b/gcc/testsuite/gcc.c-torture/execute/20021127-1.x
deleted file mode 100644
index efd854a..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/20021127-1.x
+++ /dev/null
@@ -1,2 +0,0 @@
-set additional_flags "-std=c99"
-return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/20030125-1.c b/gcc/testsuite/gcc.c-torture/execute/20030125-1.c
index 28cfbd1..60ede34 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20030125-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20030125-1.c
@@ -1,4 +1,5 @@
/* Verify whether math functions are simplified. */
+/* { dg-require-effective-target c99_runtime } */
double sin(double);
double floor(double);
float
diff --git a/gcc/testsuite/gcc.c-torture/execute/20030125-1.x b/gcc/testsuite/gcc.c-torture/execute/20030125-1.x
deleted file mode 100644
index 895cff7..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/20030125-1.x
+++ /dev/null
@@ -1,7 +0,0 @@
-# Only glibc includes all c99 functions at the moment.
-if { ! ([istarget "*-linux*"]
- || [istarget "*-gnu*"])} then {
- return 1
-}
-if { [check_effective_target_uclibc] } { return 1 }
-return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/20030216-1.c b/gcc/testsuite/gcc.c-torture/execute/20030216-1.c
index 2153bfd..0256ae3 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20030216-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20030216-1.c
@@ -1,3 +1,8 @@
+/* This test requires constant propagation of loads and stores to be
+ enabled. This is only guaranteed at -O2 and higher. Do not run
+ at -O1. */
+/* { dg-skip-if "requires higher optimization" { *-*-* } "-O1" "" } */
+
void link_error (void);
const double one=1.0;
main ()
diff --git a/gcc/testsuite/gcc.c-torture/execute/20030216-1.x b/gcc/testsuite/gcc.c-torture/execute/20030216-1.x
deleted file mode 100644
index a0e03e3..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/20030216-1.x
+++ /dev/null
@@ -1,12 +0,0 @@
-# This test requires constant propagation of loads and stores to be
-# enabled. This is only guaranteed at -O2 and higher. Do not run
-# at -O1.
-
-set torture_eval_before_compile {
- if {[string match {*-O1*} "$option"]} {
- continue
- }
-}
-
-return 0
-
diff --git a/gcc/testsuite/gcc.c-torture/execute/20030222-1.c b/gcc/testsuite/gcc.c-torture/execute/20030222-1.c
index 93d1e3c..385ae68 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20030222-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20030222-1.c
@@ -3,7 +3,7 @@
succeeded at all. We use volatile to make sure the long long is
actually truncated to int, in case a single register is wide enough
for a long long. */
-
+/* { dg-skip-if "asm would require extra shift-left-4-byte" { spu-*-* } "*" "" } */
#include <limits.h>
void
diff --git a/gcc/testsuite/gcc.c-torture/execute/20030222-1.x b/gcc/testsuite/gcc.c-torture/execute/20030222-1.x
deleted file mode 100644
index e195563..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/20030222-1.x
+++ /dev/null
@@ -1,6 +0,0 @@
-if [istarget "spu-*-*"] {
- # Using inline assembly to convert long long to int is not working quite
- # right # on the SPU. An extra shift-left-4-byte is needed.
- return 1
-}
-return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/20040629-1.c b/gcc/testsuite/gcc.c-torture/execute/20040629-1.c
index 6b3e906..5e03222 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20040629-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20040629-1.c
@@ -1,3 +1,5 @@
+/* { dg-require-effective-target int32plus } */
+
/* Test arithmetics on bitfields. */
#ifndef T
diff --git a/gcc/testsuite/gcc.c-torture/execute/20040629-1.x b/gcc/testsuite/gcc.c-torture/execute/20040629-1.x
deleted file mode 100644
index 121fcfe..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/20040629-1.x
+++ /dev/null
@@ -1,7 +0,0 @@
-load_lib target-supports.exp
-
-if { [check_effective_target_int16] } {
- return 1
-}
-
-return 0;
diff --git a/gcc/testsuite/gcc.c-torture/execute/20040703-1.c b/gcc/testsuite/gcc.c-torture/execute/20040703-1.c
index eba358d..a1b75d9 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20040703-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20040703-1.c
@@ -1,4 +1,5 @@
/* PR 16341 */
+/* { dg-require-effective-target int32plus } */
#define PART_PRECISION (sizeof (cpp_num_part) * 8)
diff --git a/gcc/testsuite/gcc.c-torture/execute/20040703-1.x b/gcc/testsuite/gcc.c-torture/execute/20040703-1.x
deleted file mode 100644
index 121fcfe..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/20040703-1.x
+++ /dev/null
@@ -1,7 +0,0 @@
-load_lib target-supports.exp
-
-if { [check_effective_target_int16] } {
- return 1
-}
-
-return 0;
diff --git a/gcc/testsuite/gcc.c-torture/execute/20040705-1.c b/gcc/testsuite/gcc.c-torture/execute/20040705-1.c
index a9ba88e..fe14d0f 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20040705-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20040705-1.c
@@ -1,2 +1,4 @@
+/* { dg-require-effective-target int32plus } */
+
#define FIELDS1 long long l;
#include "20040629-1.c"
diff --git a/gcc/testsuite/gcc.c-torture/execute/20040705-1.x b/gcc/testsuite/gcc.c-torture/execute/20040705-1.x
deleted file mode 100644
index 121fcfe..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/20040705-1.x
+++ /dev/null
@@ -1,7 +0,0 @@
-load_lib target-supports.exp
-
-if { [check_effective_target_int16] } {
- return 1
-}
-
-return 0;
diff --git a/gcc/testsuite/gcc.c-torture/execute/20040705-2.c b/gcc/testsuite/gcc.c-torture/execute/20040705-2.c
index a36fb6a..1d69586 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20040705-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20040705-2.c
@@ -1,2 +1,3 @@
+/* { dg-require-effective-target int32plus } */
#define FIELDS2 long long l;
#include "20040629-1.c"
diff --git a/gcc/testsuite/gcc.c-torture/execute/20040705-2.x b/gcc/testsuite/gcc.c-torture/execute/20040705-2.x
deleted file mode 100644
index 121fcfe..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/20040705-2.x
+++ /dev/null
@@ -1,7 +0,0 @@
-load_lib target-supports.exp
-
-if { [check_effective_target_int16] } {
- return 1
-}
-
-return 0;
diff --git a/gcc/testsuite/gcc.c-torture/execute/20040709-1.c b/gcc/testsuite/gcc.c-torture/execute/20040709-1.c
index 455313a..52de67d 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20040709-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20040709-1.c
@@ -1,3 +1,5 @@
+/* { dg-require-effective-target int32plus } */
+
/* Test arithmetics on bitfields. */
extern void abort (void);
diff --git a/gcc/testsuite/gcc.c-torture/execute/20040709-1.x b/gcc/testsuite/gcc.c-torture/execute/20040709-1.x
deleted file mode 100644
index 121fcfe..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/20040709-1.x
+++ /dev/null
@@ -1,7 +0,0 @@
-load_lib target-supports.exp
-
-if { [check_effective_target_int16] } {
- return 1
-}
-
-return 0;
diff --git a/gcc/testsuite/gcc.c-torture/execute/20040709-2.c b/gcc/testsuite/gcc.c-torture/execute/20040709-2.c
index 6ae1f2d..925050d 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20040709-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20040709-2.c
@@ -1,4 +1,5 @@
/* Test arithmetics on bitfields. */
+/* { dg-require-effective-target int32plus } */
extern void abort (void);
extern void exit (int);
diff --git a/gcc/testsuite/gcc.c-torture/execute/20040709-2.x b/gcc/testsuite/gcc.c-torture/execute/20040709-2.x
deleted file mode 100644
index 121fcfe..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/20040709-2.x
+++ /dev/null
@@ -1,7 +0,0 @@
-load_lib target-supports.exp
-
-if { [check_effective_target_int16] } {
- return 1
-}
-
-return 0;
diff --git a/gcc/testsuite/gcc.c-torture/execute/20040811-1.c b/gcc/testsuite/gcc.c-torture/execute/20040811-1.c
index 62f377a..0122825 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20040811-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20040811-1.c
@@ -1,3 +1,5 @@
+/* { dg-require-effective-target int32plus } */
+
/* Ensure that we deallocate X when branching back before its
declaration. */
diff --git a/gcc/testsuite/gcc.c-torture/execute/20040811-1.x b/gcc/testsuite/gcc.c-torture/execute/20040811-1.x
deleted file mode 100644
index 121fcfe..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/20040811-1.x
+++ /dev/null
@@ -1,7 +0,0 @@
-load_lib target-supports.exp
-
-if { [check_effective_target_int16] } {
- return 1
-}
-
-return 0;
diff --git a/gcc/testsuite/gcc.c-torture/execute/20050316-1.c b/gcc/testsuite/gcc.c-torture/execute/20050316-1.c
index 2a1c625..0a285d7 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20050316-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20050316-1.c
@@ -1,4 +1,6 @@
/* PR rtl-optimization/16104 */
+/* { dg-require-effective-target int32plus } */
+/* { dg-options "-Wno-psabi" } */
extern void abort (void);
diff --git a/gcc/testsuite/gcc.c-torture/execute/20050316-1.x b/gcc/testsuite/gcc.c-torture/execute/20050316-1.x
deleted file mode 100644
index cb2d28f..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/20050316-1.x
+++ /dev/null
@@ -1,8 +0,0 @@
-load_lib target-supports.exp
-
-if { [check_effective_target_int16] } {
- return 1
-}
-
-set additional_flags "-Wno-psabi"
-return 0;
diff --git a/gcc/testsuite/gcc.c-torture/execute/20050316-2.c b/gcc/testsuite/gcc.c-torture/execute/20050316-2.c
index c648777..920dfdb 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20050316-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20050316-2.c
@@ -1,3 +1,8 @@
+/* This testcase generates MMX instructions together with x87 instructions.
+ Currently, there is no "emms" generated to switch between register sets,
+ so the testcase fails for targets where MMX insns are enabled. */
+/* { dg-options "-mno-mmx -Wno-psabi" { target { x86_64-*-* i?86-*-* } } } */
+
extern void abort (void);
typedef int V2SI __attribute__ ((vector_size (8)));
diff --git a/gcc/testsuite/gcc.c-torture/execute/20050316-2.x b/gcc/testsuite/gcc.c-torture/execute/20050316-2.x
deleted file mode 100644
index f5b4aaa..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/20050316-2.x
+++ /dev/null
@@ -1,9 +0,0 @@
-# This testcase generates MMX instructions together with x87 instructions.
-# Currently, there is no "emms" generated to switch between register sets,
-# so the testcase fails for targets where MMX insns are enabled.
-
-if { [istarget "i?86-*-*"] || [istarget "x86_64-*-*"] } {
- set additional_flags "-mno-mmx"
-}
-
-return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/20050316-3.c b/gcc/testsuite/gcc.c-torture/execute/20050316-3.c
index 773243f..9f35ece 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20050316-3.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20050316-3.c
@@ -1,3 +1,4 @@
+/* { dg-options "-Wno-psabi" } */
extern void abort (void);
typedef int V2SI __attribute__ ((vector_size (8)));
diff --git a/gcc/testsuite/gcc.c-torture/execute/20050316-3.x b/gcc/testsuite/gcc.c-torture/execute/20050316-3.x
deleted file mode 100644
index cb7b119..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/20050316-3.x
+++ /dev/null
@@ -1,2 +0,0 @@
-set additional_flags "-Wno-psabi"
-return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/20050604-1.c b/gcc/testsuite/gcc.c-torture/execute/20050604-1.c
index 70097aa..6d63389 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20050604-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20050604-1.c
@@ -1,4 +1,8 @@
/* PR regression/21897 */
+/* This testcase generates MMX instructions together with x87 instructions.
+ Currently, there is no "emms" generated to switch between register sets,
+ so the testcase fails for targets where MMX insns are enabled. */
+/* { dg-options "-mno-mmx" { target { x86_64-*-* i?86-*-* } } } */
extern void abort (void);
diff --git a/gcc/testsuite/gcc.c-torture/execute/20050604-1.x b/gcc/testsuite/gcc.c-torture/execute/20050604-1.x
deleted file mode 100644
index 756242d..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/20050604-1.x
+++ /dev/null
@@ -1,10 +0,0 @@
-# This testcase generates MMX instructions together with x87 instructions.
-# Currently, there is no "emms" generated to switch between register sets,
-# so the testcase fails for targets where MMX insns are enabled.
-
-if { [istarget "i?86-*-*"] || [istarget "x86_64-*-*"] } {
- set additional_flags "-mno-mmx"
-}
-
-set additional_flags "-Wno-psabi"
-return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/20061101-1.c b/gcc/testsuite/gcc.c-torture/execute/20061101-1.c
index 2351728..7bea079 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20061101-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20061101-1.c
@@ -1,5 +1,6 @@
/* PR rtl-optimization/28970 */
/* Origin: Peter Bergner <bergner@vnet.ibm.com> */
+/* { dg-require-effective-target int32plus } */
extern void abort (void);
diff --git a/gcc/testsuite/gcc.c-torture/execute/20061101-1.x b/gcc/testsuite/gcc.c-torture/execute/20061101-1.x
deleted file mode 100644
index 4efed4c..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/20061101-1.x
+++ /dev/null
@@ -1,7 +0,0 @@
-load_lib target-supports.exp
-
-if { [check_effective_target_int32plus] } {
- return 0
-}
-
-return 1;
diff --git a/gcc/testsuite/gcc.c-torture/execute/20061220-1.c b/gcc/testsuite/gcc.c-torture/execute/20061220-1.c
index 188f92c..9a133e8 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20061220-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20061220-1.c
@@ -1,4 +1,5 @@
/* PR middle-end/30262 */
+/* { dg-skip-if "asm statements do not work as expected" { rl78-*-* } "*" "" } */
extern void abort (void);
int
diff --git a/gcc/testsuite/gcc.c-torture/execute/20061220-1.x b/gcc/testsuite/gcc.c-torture/execute/20061220-1.x
deleted file mode 100644
index bfc4e96..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/20061220-1.x
+++ /dev/null
@@ -1,6 +0,0 @@
-# asm statements for the RL78 do not work as expected
-if { [istarget "rl78-*-*"] } {
- return 1;
-}
-
-return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/20081117-1.c b/gcc/testsuite/gcc.c-torture/execute/20081117-1.c
index bff7464..8fa00d2 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20081117-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20081117-1.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target int32plus } */
extern void abort (void);
struct s
diff --git a/gcc/testsuite/gcc.c-torture/execute/20081117-1.x b/gcc/testsuite/gcc.c-torture/execute/20081117-1.x
deleted file mode 100644
index 7378270..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/20081117-1.x
+++ /dev/null
@@ -1,7 +0,0 @@
-load_lib target-supports.exp
-
-if { [check_effective_target_int16] } {
- return 1
-}
-
-return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/20101011-1.c b/gcc/testsuite/gcc.c-torture/execute/20101011-1.c
index 9299bb9..85b910d 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20101011-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20101011-1.c
@@ -1,5 +1,5 @@
-/* With -fnon-call-exceptions 0 / 0 should not be eliminated. The .x
- file sets the option. */
+/* { dg-options "-fnon-call-exceptions" } */
+/* With -fnon-call-exceptions 0 / 0 should not be eliminated. */
#ifdef SIGNAL_SUPPRESS
# define DO_TEST 0
@@ -75,6 +75,9 @@ __aeabi_idiv0 (int return_value)
# define DO_TEST 1
#endif
+extern void abort (void);
+extern void exit (int);
+
#if DO_TEST
#include <signal.h>
diff --git a/gcc/testsuite/gcc.c-torture/execute/20101011-1.x b/gcc/testsuite/gcc.c-torture/execute/20101011-1.x
deleted file mode 100644
index b5c080d..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/20101011-1.x
+++ /dev/null
@@ -1,2 +0,0 @@
-set additional_flags "-fnon-call-exceptions"
-return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/20120919-1.c b/gcc/testsuite/gcc.c-torture/execute/20120919-1.c
index e7f3295..afcde95 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20120919-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20120919-1.c
@@ -1,5 +1,6 @@
/* PR rtl-optimization/54290 */
/* Testcase by Eric Volk <eriksnga@gmail.com> */
+/* { dg-require-effective-target int32plus } */
double vd[2] = {1., 0.};
int vi[2] = {1234567890, 0};
diff --git a/gcc/testsuite/gcc.c-torture/execute/20120919-1.x b/gcc/testsuite/gcc.c-torture/execute/20120919-1.x
deleted file mode 100644
index 4efed4c..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/20120919-1.x
+++ /dev/null
@@ -1,7 +0,0 @@
-load_lib target-supports.exp
-
-if { [check_effective_target_int32plus] } {
- return 0
-}
-
-return 1;
diff --git a/gcc/testsuite/gcc.c-torture/execute/920612-1.c b/gcc/testsuite/gcc.c-torture/execute/920612-1.c
index a70c0d2..bc63003 100644
--- a/gcc/testsuite/gcc.c-torture/execute/920612-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/920612-1.c
@@ -1,2 +1,7 @@
+/* { dg-options "-fwrapv" } */
+
+extern void abort (void);
+extern void exit (int);
+
f(j)int j;{return++j>0;}
main(){if(f((~0U)>>1))abort();exit(0);}
diff --git a/gcc/testsuite/gcc.c-torture/execute/920612-1.x b/gcc/testsuite/gcc.c-torture/execute/920612-1.x
deleted file mode 100644
index 36a5839..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/920612-1.x
+++ /dev/null
@@ -1,2 +0,0 @@
-set additional_flags "-fwrapv"
-return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/920710-1.x b/gcc/testsuite/gcc.c-torture/execute/920710-1.x
deleted file mode 100644
index b7612f7..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/920710-1.x
+++ /dev/null
@@ -1,6 +0,0 @@
-# h8300 does not have long long
-if { [istarget "h8300-*-*"] } {
- return 1;
-}
-
-return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/920711-1.c b/gcc/testsuite/gcc.c-torture/execute/920711-1.c
index aa83452..f72ef7c 100644
--- a/gcc/testsuite/gcc.c-torture/execute/920711-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/920711-1.c
@@ -1,2 +1,7 @@
+/* { dg-options "-fwrapv" } */
+
+extern void abort (void);
+extern void exit (int);
+
f(long a){return (--a > 0);}
main(){if(f(0x80000000L)==0)abort();exit(0);}
diff --git a/gcc/testsuite/gcc.c-torture/execute/920711-1.x b/gcc/testsuite/gcc.c-torture/execute/920711-1.x
deleted file mode 100644
index 36a5839..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/920711-1.x
+++ /dev/null
@@ -1,2 +0,0 @@
-set additional_flags "-fwrapv"
-return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/930529-1.c b/gcc/testsuite/gcc.c-torture/execute/930529-1.c
index 906338e..9c4085c 100644
--- a/gcc/testsuite/gcc.c-torture/execute/930529-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/930529-1.c
@@ -1,3 +1,8 @@
+/* { dg-options { "-fwrapv" } } */
+
+extern void abort (void);
+extern void exit (int);
+
dd (x,d) { return x / d; }
main ()
diff --git a/gcc/testsuite/gcc.c-torture/execute/930529-1.x b/gcc/testsuite/gcc.c-torture/execute/930529-1.x
deleted file mode 100644
index 25225f4..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/930529-1.x
+++ /dev/null
@@ -1,24 +0,0 @@
-# The problem on Alpha at -O3 is that when dd is inlined, we have
-# division by a constant, which gets converted to multiplication
-# by a large constant, which gets turned into an induction variable.
-# The problem is that the multiplication was unsigned SImode, and the
-# induction variable is DImode, and we lose the truncation that
-# should have happened.
-#
-# On tree-ssa branch, the loop problem is still extant, but the
-# gimple-level optimization makes it easy for the tree-rtl expanders
-# to see that the comparisons are always true, and so the loop code
-# is never exercized.
-
-# set torture_eval_before_execute {
-#
-# set compiler_conditional_xfail_data {
-# "division by a constant conflicts with strength reduction" \
-# "alpha*-*-*" \
-# { "-O3" } \
-# { "" }
-# }
-# }
-
-set additional_flags "-fwrapv"
-return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/931004-12.x b/gcc/testsuite/gcc.c-torture/execute/931004-12.x
deleted file mode 100644
index 591dc7f..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/931004-12.x
+++ /dev/null
@@ -1,6 +0,0 @@
-if { [istarget "powerpc-*-darwin*] } {
- # xfail this on powerpc-*-darwin, see PR 15923
- set torture_execute_xfail [istarget]
-}
-
-return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/980709-1.c b/gcc/testsuite/gcc.c-torture/execute/980709-1.c
index cda8076..54b3bbc 100644
--- a/gcc/testsuite/gcc.c-torture/execute/980709-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/980709-1.c
@@ -1,3 +1,4 @@
+/* { dg-xfail-if "Can not call system libm.a with -msoft-float" { powerpc-*-aix* rs6000-*-aix* } { "-msoft-float" } { "" } } */
#include <math.h>
main()
diff --git a/gcc/testsuite/gcc.c-torture/execute/980709-1.x b/gcc/testsuite/gcc.c-torture/execute/980709-1.x
deleted file mode 100644
index 307f568..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/980709-1.x
+++ /dev/null
@@ -1,16 +0,0 @@
-# XFAIL this test for AIX using -msoft-float.
-# This test calls the system libm.a function pow.
-# A false failure is reported if -msoft-float is used.
-# AIX expects the parameters to be passed in fp regs.
-if { [istarget powerpc-*-aix*] || [istarget rs6000-*-aix*] } {
- set torture_eval_before_execute {
- global compiler_conditional_xfail_data
- set compiler_conditional_xfail_data {
- "Can not call system libm.a with -msoft-float" \
- "*-*-aix*" \
- { "-msoft-float" } \
- { "" }
- }
- }
-}
-return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/981130-1.c b/gcc/testsuite/gcc.c-torture/execute/981130-1.c
index 72630b0..c4ca227 100644
--- a/gcc/testsuite/gcc.c-torture/execute/981130-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/981130-1.c
@@ -1,3 +1,4 @@
+/* { dg-xfail-if "alias analysis conflicts with instruction scheduling" { m32r-*-* } { "-O2" "-O1" "-O0" "-Os"} { "" } } */
struct s { int a; int b;};
struct s s1;
struct s s2 = { 1, 2, };
diff --git a/gcc/testsuite/gcc.c-torture/execute/981130-1.x b/gcc/testsuite/gcc.c-torture/execute/981130-1.x
deleted file mode 100644
index 1565c68..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/981130-1.x
+++ /dev/null
@@ -1,22 +0,0 @@
-# This test is known to fail on targets that use the instruction scheduler
-# at optimisation levels of 2 or more because the alias analysis is confused
-# by the reassignment of a variable structure to a fixed structure. The
-# failure could be suppressed by preventing instruction scheduling:
-#
-# set additional_flags "-fno-schedule-insns2";
-#
-# but this would disguise the fact that there is a problem. Instead we use
-# we generate an xfail result and explain that it is alias analysis that
-# is at fault.
-
-set torture_eval_before_execute {
-
- set compiler_conditional_xfail_data {
- "alias analysis conflicts with instruction scheduling" \
- "m32r-*-*" \
- { "-O2" "-O1" "-O0" "-Os"} \
- { "" }
- }
-}
-
-return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/990127-1.c b/gcc/testsuite/gcc.c-torture/execute/990127-1.c
index c495848..8b572a7 100644
--- a/gcc/testsuite/gcc.c-torture/execute/990127-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/990127-1.c
@@ -1,3 +1,6 @@
+extern void abort (void);
+extern void exit (int);
+
main()
{
int a,b,c;
diff --git a/gcc/testsuite/gcc.c-torture/execute/990127-2.c b/gcc/testsuite/gcc.c-torture/execute/990127-2.c
index 0d0f495..e87d27a 100644
--- a/gcc/testsuite/gcc.c-torture/execute/990127-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/990127-2.c
@@ -1,3 +1,8 @@
+/* { dg-options "-mpc64" { target { i?86-*-* x86_64-*-* } } } */
+
+extern void abort (void);
+extern void exit (int);
+
void
fpEq (double x, double y)
{
diff --git a/gcc/testsuite/gcc.c-torture/execute/990127-2.x b/gcc/testsuite/gcc.c-torture/execute/990127-2.x
deleted file mode 100644
index 501e931..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/990127-2.x
+++ /dev/null
@@ -1,20 +0,0 @@
-# On x86 targets, two floating-point double values can't be reliably compared
-# for inequality due to excess precision of 80387 floating-point coprocessor.
-# Use -mpc64 to force 80387 floating-point precision to 64 bits. This option
-# has no effect on SSE, but it is needed in case of -m32 on x86_64 targets.
-
-if { [istarget i?86-*-darwin*]
- || [istarget i?86-*-linux*]
- || [istarget i?86-*-gnu*]
- || [istarget i?86-*-kfreebsd*-gnu]
- || [istarget i?86-*-knetbsd*-gnu]
- || [istarget i?86-*-solaris2*]
- || [istarget x86_64-*-darwin*]
- || [istarget x86_64-*-linux*]
- || [istarget x86_64-*-kfreebsd*-gnu]
- || [istarget x86_64-*-knetbsd*-gnu]
- || [istarget x86_64-*-solaris2*] } {
- set additional_flags "-mpc64"
-}
-
-return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/990413-2.c b/gcc/testsuite/gcc.c-torture/execute/990413-2.c
index 262140a..3beb540 100644
--- a/gcc/testsuite/gcc.c-torture/execute/990413-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/990413-2.c
@@ -1,4 +1,5 @@
/* This tests for a bug in regstack that was breaking glibc's math library. */
+/* { dg-skip-if "" { ! { i?86-*-* x86_64-*-* } } { "*" } { "" } } */
extern void abort (void);
diff --git a/gcc/testsuite/gcc.c-torture/execute/990413-2.x b/gcc/testsuite/gcc.c-torture/execute/990413-2.x
deleted file mode 100644
index 58be1c0..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/990413-2.x
+++ /dev/null
@@ -1,3 +0,0 @@
-# This test is x86 specific.
-if { [istarget "i?86-*-*"] || [istarget "x86_64-*-*"] } { return 0 }
-return 1
diff --git a/gcc/testsuite/gcc.c-torture/execute/990826-0.c b/gcc/testsuite/gcc.c-torture/execute/990826-0.c
index 2807ea3..c630da7 100644
--- a/gcc/testsuite/gcc.c-torture/execute/990826-0.c
+++ b/gcc/testsuite/gcc.c-torture/execute/990826-0.c
@@ -6,6 +6,8 @@ Date: Sun, 06 Jun 1999 23:37:23 -0400
X-UIDL: 9c1e40c572e3b306464f703461764cd5
*/
+/* { dg-xfail-if "Can not call system libm.a with -msoft-float" { powerpc-*-aix* rs6000-*-aix* } { "-msoft-float" } { "" } } */
+
#include <stdio.h>
#include <math.h>
diff --git a/gcc/testsuite/gcc.c-torture/execute/990826-0.x b/gcc/testsuite/gcc.c-torture/execute/990826-0.x
deleted file mode 100644
index 477c10b..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/990826-0.x
+++ /dev/null
@@ -1,16 +0,0 @@
-# XFAIL this test for AIX using -msoft-float.
-# This test calls the system libm.a function floor.
-# A false failure is reported if -msoft-float is used.
-# AIX expects the parameters to be passed in fp regs.
-if { [istarget powerpc-*-aix*] || [istarget rs6000-*-aix*] } {
- set torture_eval_before_execute {
- global compiler_conditional_xfail_data
- set compiler_conditional_xfail_data {
- "Can not call system libm.a with -msoft-float" \
- "*-*-aix*" \
- { "-msoft-float" } \
- { "" }
- }
- }
-}
-return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/bf64-1.c b/gcc/testsuite/gcc.c-torture/execute/bf64-1.c
index 60028fb..d69a7c4 100644
--- a/gcc/testsuite/gcc.c-torture/execute/bf64-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/bf64-1.c
@@ -1,3 +1,4 @@
+/* { dg-xfail-if "ABI specifies bitfields cannot exceed 32 bits" { mcore-*-* } "*" "" } */
struct tmp
{
long long int pad : 12;
diff --git a/gcc/testsuite/gcc.c-torture/execute/bf64-1.x b/gcc/testsuite/gcc.c-torture/execute/bf64-1.x
deleted file mode 100644
index f3069f2..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/bf64-1.x
+++ /dev/null
@@ -1,8 +0,0 @@
-# The MCore ABI specifies that bitfields may not exceed 32 bits.
-# Hence this tes will fail.
-
-if { [istarget "mcore-*-*"] } {
- set torture_execute_xfail "mcore-*-*"
-}
-
-return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/bitfld-4.c b/gcc/testsuite/gcc.c-torture/execute/bitfld-4.c
index 6f7d7e2..13a5c69 100644
--- a/gcc/testsuite/gcc.c-torture/execute/bitfld-4.c
+++ b/gcc/testsuite/gcc.c-torture/execute/bitfld-4.c
@@ -6,6 +6,8 @@
32-bit systems. */
/* Origin: Joseph Myers <jsm@polyomino.org.uk> */
+/* { dg-require-effective-target int32plus } */
+
extern void abort (void);
struct s { int a:12, b:20; };
diff --git a/gcc/testsuite/gcc.c-torture/execute/bitfld-4.x b/gcc/testsuite/gcc.c-torture/execute/bitfld-4.x
deleted file mode 100644
index 121fcfe..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/bitfld-4.x
+++ /dev/null
@@ -1,7 +0,0 @@
-load_lib target-supports.exp
-
-if { [check_effective_target_int16] } {
- return 1
-}
-
-return 0;
diff --git a/gcc/testsuite/gcc.c-torture/execute/cmpsi-2.c b/gcc/testsuite/gcc.c-torture/execute/cmpsi-2.c
index 62832a9..52c8065 100644
--- a/gcc/testsuite/gcc.c-torture/execute/cmpsi-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/cmpsi-2.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target int32plus } */
#define F 140
#define T 13
diff --git a/gcc/testsuite/gcc.c-torture/execute/cmpsi-2.x b/gcc/testsuite/gcc.c-torture/execute/cmpsi-2.x
deleted file mode 100644
index 121fcfe..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/cmpsi-2.x
+++ /dev/null
@@ -1,7 +0,0 @@
-load_lib target-supports.exp
-
-if { [check_effective_target_int16] } {
- return 1
-}
-
-return 0;
diff --git a/gcc/testsuite/gcc.c-torture/execute/cvt-1.x b/gcc/testsuite/gcc.c-torture/execute/cvt-1.x
deleted file mode 100644
index 997c865..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/cvt-1.x
+++ /dev/null
@@ -1,7 +0,0 @@
-# This doesn't work on d10v if ints are not 32 bits
-
-if { [istarget "d10v-*-*"] && ! [string-match "*-mint32*" $CFLAGS] } {
- set torture_execute_xfail "d10v-*-*"
-}
-
-return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/eeprof-1.c b/gcc/testsuite/gcc.c-torture/execute/eeprof-1.c
index 248b8cc..96dab9a 100644
--- a/gcc/testsuite/gcc.c-torture/execute/eeprof-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/eeprof-1.c
@@ -1,3 +1,8 @@
+/* { dg-options "-finstrument-functions" } */
+/* { dg-xfail-if "" { powerpc-ibm-aix* } "*" "" } */
+
+extern void abort (void);
+
#define ASSERT(X) if (!(X)) abort ();
#define NOCHK __attribute__ ((no_instrument_function))
diff --git a/gcc/testsuite/gcc.c-torture/execute/eeprof-1.x b/gcc/testsuite/gcc.c-torture/execute/eeprof-1.x
deleted file mode 100644
index d53f8c2..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/eeprof-1.x
+++ /dev/null
@@ -1,5 +0,0 @@
-if { [istarget "powerpc-ibm-aix*"] } {
- set torture_execute_xfail "powerpc-ibm-aix*"
-}
-set additional_flags "-finstrument-functions"
-return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/execute.exp b/gcc/testsuite/gcc.c-torture/execute/execute.exp
index 9f29ef2..886bd05 100644
--- a/gcc/testsuite/gcc.c-torture/execute/execute.exp
+++ b/gcc/testsuite/gcc.c-torture/execute/execute.exp
@@ -22,28 +22,17 @@
# C torture test suite.
#
-if $tracelevel then {
- strace $tracelevel
-}
+# Load support procs.
+load_lib gcc-dg.exp
-# load support procs
-load_lib torture-options.exp
-load_lib c-torture.exp
+# Initialize `dg'.
+dg-init
-torture-init
-set-torture-options $C_TORTURE_OPTIONS {{}} $LTO_TORTURE_OPTIONS
+# Main loop.
+set saved-dg-do-what-default ${dg-do-what-default}
+set dg-do-what-default "run"
+gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] "" "-w"
+set dg-do-what-default ${saved-dg-do-what-default}
-#
-# main test loop
-#
-
-foreach src [lsort [glob -nocomplain $srcdir/$subdir/*.c]] {
- # If we're only testing specific files and this isn't one of them, skip it.
- if ![runtest_file_p $runtests $src] then {
- continue
- }
-
- c-torture-execute $src
-}
-
-torture-finish
+# All done.
+dg-finish
diff --git a/gcc/testsuite/gcc.c-torture/execute/ipa-sra-2.c b/gcc/testsuite/gcc.c-torture/execute/ipa-sra-2.c
index 515d416..feb2a34 100644
--- a/gcc/testsuite/gcc.c-torture/execute/ipa-sra-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/ipa-sra-2.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target int32plus } */
struct big
{
int data[1000000];
diff --git a/gcc/testsuite/gcc.c-torture/execute/ipa-sra-2.x b/gcc/testsuite/gcc.c-torture/execute/ipa-sra-2.x
deleted file mode 100644
index c65423e..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/ipa-sra-2.x
+++ /dev/null
@@ -1,3 +0,0 @@
-load_lib target-supports.exp
-
-return [expr [check_effective_target_int16 ]]
diff --git a/gcc/testsuite/gcc.c-torture/execute/loop-2f.c b/gcc/testsuite/gcc.c-torture/execute/loop-2f.c
index 4803d64..539db4b 100644
--- a/gcc/testsuite/gcc.c-torture/execute/loop-2f.c
+++ b/gcc/testsuite/gcc.c-torture/execute/loop-2f.c
@@ -1,3 +1,6 @@
+/* { dg-require-effective-target mmap } */
+/* { dg-skip-if "the executable is at the same position the test tries to remap" { m68k-*-linux* } { "*" } { "" } } */
+
#include <limits.h>
#include <sys/types.h>
diff --git a/gcc/testsuite/gcc.c-torture/execute/loop-2f.x b/gcc/testsuite/gcc.c-torture/execute/loop-2f.x
deleted file mode 100644
index ad024dd..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/loop-2f.x
+++ /dev/null
@@ -1,11 +0,0 @@
-load_lib target-supports.exp
-
-if { ! [check_effective_target_mmap] } {
- return 1
-}
-
-if [istarget "m68k-*-linux*"] {
- # the executable is at the same position the test tries to remap
- return 1
-}
-return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/loop-2g.c b/gcc/testsuite/gcc.c-torture/execute/loop-2g.c
index 91af413..0840945 100644
--- a/gcc/testsuite/gcc.c-torture/execute/loop-2g.c
+++ b/gcc/testsuite/gcc.c-torture/execute/loop-2g.c
@@ -1,3 +1,6 @@
+/* { dg-require-effective-target mmap } */
+/* { dg-skip-if "the executable is at the same position the test tries to remap" { m68k-*-linux* } { "*" } { "" } } */
+
#include <limits.h>
#include <sys/types.h>
diff --git a/gcc/testsuite/gcc.c-torture/execute/loop-2g.x b/gcc/testsuite/gcc.c-torture/execute/loop-2g.x
deleted file mode 100644
index ad024dd..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/loop-2g.x
+++ /dev/null
@@ -1,11 +0,0 @@
-load_lib target-supports.exp
-
-if { ! [check_effective_target_mmap] } {
- return 1
-}
-
-if [istarget "m68k-*-linux*"] {
- # the executable is at the same position the test tries to remap
- return 1
-}
-return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/mode-dependent-address.c b/gcc/testsuite/gcc.c-torture/execute/mode-dependent-address.c
index 5bf840c..49c8c09 100644
--- a/gcc/testsuite/gcc.c-torture/execute/mode-dependent-address.c
+++ b/gcc/testsuite/gcc.c-torture/execute/mode-dependent-address.c
@@ -1,3 +1,5 @@
+/* { dg-require-effective-target stdint_types } */
+
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.c-torture/execute/mode-dependent-address.x b/gcc/testsuite/gcc.c-torture/execute/mode-dependent-address.x
deleted file mode 100644
index 6622e71..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/mode-dependent-address.x
+++ /dev/null
@@ -1,7 +0,0 @@
-load_lib target-supports.exp
-
-if { ! [check_effective_target_stdint_types] } {
- return 1
-}
-
-return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/nest-align-1.c b/gcc/testsuite/gcc.c-torture/execute/nest-align-1.c
index 548c887..73c0f64 100644
--- a/gcc/testsuite/gcc.c-torture/execute/nest-align-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/nest-align-1.c
@@ -2,6 +2,9 @@
function. */
/* Origin: Joey Ye <joey.ye@intel.com> */
+/* Force bigger stack alignment for PowerPC EABI targets. */
+/* { dg-options "-mno-eabi" { target powerpc-*-eabi* } } */
+
#include <stddef.h>
typedef int aligned __attribute__((aligned));
diff --git a/gcc/testsuite/gcc.c-torture/execute/nest-align-1.x b/gcc/testsuite/gcc.c-torture/execute/nest-align-1.x
deleted file mode 100644
index 392d9aa..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/nest-align-1.x
+++ /dev/null
@@ -1,5 +0,0 @@
-# Force bigger stack alignment for PowerPC EABI targets.
-if { [istarget "powerpc-*-eabi*"] } {
- set additional_flags "-mno-eabi"
-}
-return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr19689.c b/gcc/testsuite/gcc.c-torture/execute/pr19689.c
index 608415f..d950315 100644
--- a/gcc/testsuite/gcc.c-torture/execute/pr19689.c
+++ b/gcc/testsuite/gcc.c-torture/execute/pr19689.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target int32plus } */
extern void abort (void);
struct
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr19689.x b/gcc/testsuite/gcc.c-torture/execute/pr19689.x
deleted file mode 100644
index 121fcfe..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/pr19689.x
+++ /dev/null
@@ -1,7 +0,0 @@
-load_lib target-supports.exp
-
-if { [check_effective_target_int16] } {
- return 1
-}
-
-return 0;
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr22493-1.c b/gcc/testsuite/gcc.c-torture/execute/pr22493-1.c
index bc0ff78..dedcb65 100644
--- a/gcc/testsuite/gcc.c-torture/execute/pr22493-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/pr22493-1.c
@@ -1,3 +1,5 @@
+/* { dg-options "-fwrapv" } */
+
#include <limits.h>
extern void abort ();
extern void exit (int);
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr22493-1.x b/gcc/testsuite/gcc.c-torture/execute/pr22493-1.x
deleted file mode 100644
index 36a5839..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/pr22493-1.x
+++ /dev/null
@@ -1,2 +0,0 @@
-set additional_flags "-fwrapv"
-return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr23047.c b/gcc/testsuite/gcc.c-torture/execute/pr23047.c
index 7557fc2..2c963ab 100644
--- a/gcc/testsuite/gcc.c-torture/execute/pr23047.c
+++ b/gcc/testsuite/gcc.c-torture/execute/pr23047.c
@@ -1,3 +1,4 @@
+/* { dg-options "-fwrapv" } */
#include <limits.h>
extern void abort ();
extern void exit (int);
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr23047.x b/gcc/testsuite/gcc.c-torture/execute/pr23047.x
deleted file mode 100644
index 36a5839..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/pr23047.x
+++ /dev/null
@@ -1,2 +0,0 @@
-set additional_flags "-fwrapv"
-return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr23135.c b/gcc/testsuite/gcc.c-torture/execute/pr23135.c
index 57b5f7c..378ebe7 100644
--- a/gcc/testsuite/gcc.c-torture/execute/pr23135.c
+++ b/gcc/testsuite/gcc.c-torture/execute/pr23135.c
@@ -1,10 +1,15 @@
/* Based on execute/simd-1.c, modified by joern.rennecke@st.com to
trigger a reload bug. Verified for gcc mainline from 20050722 13:00 UTC
for sh-elf -m4 -O2. */
+/* { dg-options "-Wno-psabi" } */
+
#ifndef STACK_SIZE
#define STACK_SIZE (256*1024)
#endif
+extern void abort (void);
+extern void exit (int);
+
typedef struct { char c[STACK_SIZE/2]; } big_t;
typedef int __attribute__((mode(SI))) __attribute__((vector_size (8))) vecint;
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr23135.x b/gcc/testsuite/gcc.c-torture/execute/pr23135.x
deleted file mode 100644
index cb7b119..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/pr23135.x
+++ /dev/null
@@ -1,2 +0,0 @@
-set additional_flags "-Wno-psabi"
-return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr29797-1.c b/gcc/testsuite/gcc.c-torture/execute/pr29797-1.c
index 9bcc2a9..40758c1 100644
--- a/gcc/testsuite/gcc.c-torture/execute/pr29797-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/pr29797-1.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target int32plus } */
extern void abort(void);
unsigned int bar(void) { return 32768; }
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr29797-1.x b/gcc/testsuite/gcc.c-torture/execute/pr29797-1.x
deleted file mode 100644
index 4efed4c..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/pr29797-1.x
+++ /dev/null
@@ -1,7 +0,0 @@
-load_lib target-supports.exp
-
-if { [check_effective_target_int32plus] } {
- return 0
-}
-
-return 1;
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr31448.c b/gcc/testsuite/gcc.c-torture/execute/pr31448.c
index 720ba92..fb8c247 100644
--- a/gcc/testsuite/gcc.c-torture/execute/pr31448.c
+++ b/gcc/testsuite/gcc.c-torture/execute/pr31448.c
@@ -1,5 +1,6 @@
/* PR middle-end/31448, this used to ICE during expand because
reduce_to_bit_field_precision was not ready to handle constants. */
+/* { dg-require-effective-target int32plus } */
typedef struct _st {
int iIndex : 24;
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr31448.x b/gcc/testsuite/gcc.c-torture/execute/pr31448.x
deleted file mode 100644
index 4efed4c..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/pr31448.x
+++ /dev/null
@@ -1,7 +0,0 @@
-load_lib target-supports.exp
-
-if { [check_effective_target_int32plus] } {
- return 0
-}
-
-return 1;
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr35456.c b/gcc/testsuite/gcc.c-torture/execute/pr35456.c
index 175a0b2..17c70bc 100644
--- a/gcc/testsuite/gcc.c-torture/execute/pr35456.c
+++ b/gcc/testsuite/gcc.c-torture/execute/pr35456.c
@@ -1,3 +1,4 @@
+/* { dg-skip-if "signed zero not supported" { "vax-*-*" } { "*" } { "" } } */
extern void abort (void);
double
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr35456.x b/gcc/testsuite/gcc.c-torture/execute/pr35456.x
deleted file mode 100644
index 73b18fb..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/pr35456.x
+++ /dev/null
@@ -1,3 +0,0 @@
-# VAX does not support signed zero.
-if [istarget "vax-*-*"] { return 1 }
-return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr37573.c b/gcc/testsuite/gcc.c-torture/execute/pr37573.c
index 5891910..173a8d4 100644
--- a/gcc/testsuite/gcc.c-torture/execute/pr37573.c
+++ b/gcc/testsuite/gcc.c-torture/execute/pr37573.c
@@ -1,4 +1,5 @@
/* PR tree-optimization/37573 */
+/* { dg-require-effective-target int32plus } */
struct S
{
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr37573.x b/gcc/testsuite/gcc.c-torture/execute/pr37573.x
deleted file mode 100644
index 7378270..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/pr37573.x
+++ /dev/null
@@ -1,7 +0,0 @@
-load_lib target-supports.exp
-
-if { [check_effective_target_int16] } {
- return 1
-}
-
-return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr38151.c b/gcc/testsuite/gcc.c-torture/execute/pr38151.c
index 113a255..5ee058d 100644
--- a/gcc/testsuite/gcc.c-torture/execute/pr38151.c
+++ b/gcc/testsuite/gcc.c-torture/execute/pr38151.c
@@ -1,3 +1,4 @@
+/* { dg-options "-Wno-psabi" } */
void abort (void);
struct S2848
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr38151.x b/gcc/testsuite/gcc.c-torture/execute/pr38151.x
deleted file mode 100644
index cb7b119..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/pr38151.x
+++ /dev/null
@@ -1,2 +0,0 @@
-set additional_flags "-Wno-psabi"
-return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr39228.c b/gcc/testsuite/gcc.c-torture/execute/pr39228.c
index 06d8efd..dcd8d53 100644
--- a/gcc/testsuite/gcc.c-torture/execute/pr39228.c
+++ b/gcc/testsuite/gcc.c-torture/execute/pr39228.c
@@ -1,3 +1,6 @@
+/* { dg-options "-mieee" { target sh*-*-* alpha*-*-* } } */
+/* { dg-skip-if "No Inf/NaN support" { spu-*-* } "*" "" } */
+
extern void abort (void);
static int __attribute__((always_inline)) testf (float b)
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr39228.x b/gcc/testsuite/gcc.c-torture/execute/pr39228.x
deleted file mode 100644
index a7d8a82..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/pr39228.x
+++ /dev/null
@@ -1,10 +0,0 @@
-if { [istarget "alpha*-*-*"] || [istarget "sh*-*-*"] } {
- # alpha and SH require -mieee for this test.
- set additional_flags "-mieee"
-}
-if [istarget "spu-*-*"] {
- # No Inf/NaN support on SPU.
- return 1
-}
-
-return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr39501.c b/gcc/testsuite/gcc.c-torture/execute/pr39501.c
index 3749d6e..9c1868d 100644
--- a/gcc/testsuite/gcc.c-torture/execute/pr39501.c
+++ b/gcc/testsuite/gcc.c-torture/execute/pr39501.c
@@ -1,4 +1,8 @@
/* { dg-options "-ffast-math" } */
+
+extern void abort (void);
+extern void exit (int);
+
#define min1(a,b) ((a) < (b) ? (a) : (b))
#define max1(a,b) ((a) > (b) ? (a) : (b))
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr39501.x b/gcc/testsuite/gcc.c-torture/execute/pr39501.x
deleted file mode 100644
index 72527d7..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/pr39501.x
+++ /dev/null
@@ -1,2 +0,0 @@
-set additional_flags "-ffast-math"
-return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr40386.c b/gcc/testsuite/gcc.c-torture/execute/pr40386.c
index ae0ac5a..59cd641 100644
--- a/gcc/testsuite/gcc.c-torture/execute/pr40386.c
+++ b/gcc/testsuite/gcc.c-torture/execute/pr40386.c
@@ -1,4 +1,8 @@
/* { dg-options "-fno-ira-share-spill-slots" } */
+
+extern void abort (void);
+extern void exit (int);
+
#define CHAR_BIT 8
#define ROR(a,b) (((a) >> (b)) | ((a) << ((sizeof (a) * CHAR_BIT) - (b))))
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr40386.x b/gcc/testsuite/gcc.c-torture/execute/pr40386.x
deleted file mode 100644
index 12192e2..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/pr40386.x
+++ /dev/null
@@ -1,2 +0,0 @@
-set additional_flags "-fno-ira-share-spill-slots"
-return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr43220.c b/gcc/testsuite/gcc.c-torture/execute/pr43220.c
index 4709f17..0d6ebfb 100644
--- a/gcc/testsuite/gcc.c-torture/execute/pr43220.c
+++ b/gcc/testsuite/gcc.c-torture/execute/pr43220.c
@@ -1,3 +1,5 @@
+/* { dg-require-effective-target int32plus } */
+
void *volatile p;
int
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr43220.x b/gcc/testsuite/gcc.c-torture/execute/pr43220.x
deleted file mode 100644
index 121fcfe..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/pr43220.x
+++ /dev/null
@@ -1,7 +0,0 @@
-load_lib target-supports.exp
-
-if { [check_effective_target_int16] } {
- return 1
-}
-
-return 0;
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr44683.c b/gcc/testsuite/gcc.c-torture/execute/pr44683.c
index d0fd446..85eb016 100644
--- a/gcc/testsuite/gcc.c-torture/execute/pr44683.c
+++ b/gcc/testsuite/gcc.c-torture/execute/pr44683.c
@@ -1,3 +1,4 @@
+/* { dg-options "-mieee" { target sh*-*-* } } */
int __attribute__((noinline,noclone))
copysign_bug (double x)
{
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr44683.x b/gcc/testsuite/gcc.c-torture/execute/pr44683.x
deleted file mode 100644
index 2041340..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/pr44683.x
+++ /dev/null
@@ -1,6 +0,0 @@
-if { [istarget "sh*-*-*"] } {
- # SH require -mieee for this test.
- set additional_flags "-mieee"
-}
-
-return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr45262.c b/gcc/testsuite/gcc.c-torture/execute/pr45262.c
index 72e186b..45cc8de 100644
--- a/gcc/testsuite/gcc.c-torture/execute/pr45262.c
+++ b/gcc/testsuite/gcc.c-torture/execute/pr45262.c
@@ -1,5 +1,7 @@
/* PR middle-end/45262 */
+/* { dg-require-effective-target int32plus } */
+
extern void abort (void);
int
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr45262.x b/gcc/testsuite/gcc.c-torture/execute/pr45262.x
deleted file mode 100644
index 121fcfe..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/pr45262.x
+++ /dev/null
@@ -1,7 +0,0 @@
-load_lib target-supports.exp
-
-if { [check_effective_target_int16] } {
- return 1
-}
-
-return 0;
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr47237.c b/gcc/testsuite/gcc.c-torture/execute/pr47237.c
index 2100e15..470c8ee 100644
--- a/gcc/testsuite/gcc.c-torture/execute/pr47237.c
+++ b/gcc/testsuite/gcc.c-torture/execute/pr47237.c
@@ -1,3 +1,4 @@
+/* { dg-xfail-if "can cause stack underflow" { nios2-*-* } "*" "" } */
#define INTEGER_ARG 5
extern void abort(void);
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr47237.x b/gcc/testsuite/gcc.c-torture/execute/pr47237.x
deleted file mode 100644
index d5d6988..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/pr47237.x
+++ /dev/null
@@ -1,6 +0,0 @@
-if { [istarget "nios2-*-*"] } {
- # This test can cause the stack to underflow on Nios II.
- set torture_execute_xfail [istarget]
-}
-
-return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr51581-1.c b/gcc/testsuite/gcc.c-torture/execute/pr51581-1.c
index 396b7aa..14e1e31 100644
--- a/gcc/testsuite/gcc.c-torture/execute/pr51581-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/pr51581-1.c
@@ -1,5 +1,7 @@
/* PR tree-optimization/51581 */
+/* { dg-require-effective-target int32plus } */
+
extern void abort (void);
#define N 4096
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr51581-1.x b/gcc/testsuite/gcc.c-torture/execute/pr51581-1.x
deleted file mode 100644
index 4efed4c..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/pr51581-1.x
+++ /dev/null
@@ -1,7 +0,0 @@
-load_lib target-supports.exp
-
-if { [check_effective_target_int32plus] } {
- return 0
-}
-
-return 1;
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr51581-2.c b/gcc/testsuite/gcc.c-torture/execute/pr51581-2.c
index dc111c4..e4345b5 100644
--- a/gcc/testsuite/gcc.c-torture/execute/pr51581-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/pr51581-2.c
@@ -1,4 +1,5 @@
/* PR tree-optimization/51581 */
+/* { dg-require-effective-target int32plus } */
extern void abort (void);
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr51581-2.x b/gcc/testsuite/gcc.c-torture/execute/pr51581-2.x
deleted file mode 100644
index 4efed4c..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/pr51581-2.x
+++ /dev/null
@@ -1,7 +0,0 @@
-load_lib target-supports.exp
-
-if { [check_effective_target_int32plus] } {
- return 0
-}
-
-return 1;
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr52979-1.c b/gcc/testsuite/gcc.c-torture/execute/pr52979-1.c
index 246b1fd..13ecb79 100644
--- a/gcc/testsuite/gcc.c-torture/execute/pr52979-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/pr52979-1.c
@@ -1,5 +1,7 @@
/* PR middle-end/52979 */
+/* { dg-require-effective-target int32plus } */
+
extern void abort (void);
int c, d, e;
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr52979-1.x b/gcc/testsuite/gcc.c-torture/execute/pr52979-1.x
deleted file mode 100644
index 4efed4c..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/pr52979-1.x
+++ /dev/null
@@ -1,7 +0,0 @@
-load_lib target-supports.exp
-
-if { [check_effective_target_int32plus] } {
- return 0
-}
-
-return 1;
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr52979-2.c b/gcc/testsuite/gcc.c-torture/execute/pr52979-2.c
index 52f5bb8..91d4fbc 100644
--- a/gcc/testsuite/gcc.c-torture/execute/pr52979-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/pr52979-2.c
@@ -1,4 +1,5 @@
/* PR middle-end/52979 */
+/* { dg-require-effective-target int32plus } */
extern void abort (void);
int c, d, e;
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr52979-2.x b/gcc/testsuite/gcc.c-torture/execute/pr52979-2.x
deleted file mode 100644
index 4efed4c..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/pr52979-2.x
+++ /dev/null
@@ -1,7 +0,0 @@
-load_lib target-supports.exp
-
-if { [check_effective_target_int32plus] } {
- return 0
-}
-
-return 1;
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr53366-1.x b/gcc/testsuite/gcc.c-torture/execute/pr53366-1.x
deleted file mode 100644
index eeb3846..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/pr53366-1.x
+++ /dev/null
@@ -1,7 +0,0 @@
-load_lib target-supports.exp
-
-if { [check_effective_target_int16] } {
- return 1
-}
-
-return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr56799.c b/gcc/testsuite/gcc.c-torture/execute/pr56799.c
index d9ee26b..a8558ea 100644
--- a/gcc/testsuite/gcc.c-torture/execute/pr56799.c
+++ b/gcc/testsuite/gcc.c-torture/execute/pr56799.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target int32plus } */
#include <stdio.h>
typedef struct { int x; int y;} S;
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr56799.x b/gcc/testsuite/gcc.c-torture/execute/pr56799.x
deleted file mode 100644
index 4efed4c..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/pr56799.x
+++ /dev/null
@@ -1,7 +0,0 @@
-load_lib target-supports.exp
-
-if { [check_effective_target_int32plus] } {
- return 0
-}
-
-return 1;
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr57124.c b/gcc/testsuite/gcc.c-torture/execute/pr57124.c
index 835d249..ca60158 100644
--- a/gcc/testsuite/gcc.c-torture/execute/pr57124.c
+++ b/gcc/testsuite/gcc.c-torture/execute/pr57124.c
@@ -1,3 +1,9 @@
+/* { dg-require-effective-target int32plus } */
+/* { dg-options "-fno-strict-overflow" } */
+
+extern void abort (void);
+extern void exit (int);
+
__attribute__ ((noinline))
foo(short unsigned int *p1, short unsigned int *p2)
{
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr57124.x b/gcc/testsuite/gcc.c-torture/execute/pr57124.x
deleted file mode 100644
index da6cfd0..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/pr57124.x
+++ /dev/null
@@ -1,9 +0,0 @@
-load_lib target-supports.exp
-
-set additional_flags "-fno-strict-overflow"
-
-if { [check_effective_target_int16] } {
- return 1
-}
-
-return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr57344-2.c b/gcc/testsuite/gcc.c-torture/execute/pr57344-2.c
index 9bf60ca..599071b 100644
--- a/gcc/testsuite/gcc.c-torture/execute/pr57344-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/pr57344-2.c
@@ -1,4 +1,5 @@
/* PR middle-end/57344 */
+/* { dg-require-effective-target int32plus } */
struct __attribute__((packed)) S
{
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr57344-2.x b/gcc/testsuite/gcc.c-torture/execute/pr57344-2.x
deleted file mode 100644
index 121fcfe..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/pr57344-2.x
+++ /dev/null
@@ -1,7 +0,0 @@
-load_lib target-supports.exp
-
-if { [check_effective_target_int16] } {
- return 1
-}
-
-return 0;
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr58570.c b/gcc/testsuite/gcc.c-torture/execute/pr58570.c
index 6d5116d..28b6efe 100644
--- a/gcc/testsuite/gcc.c-torture/execute/pr58570.c
+++ b/gcc/testsuite/gcc.c-torture/execute/pr58570.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target int32plus } */
#pragma pack(1)
struct S
{
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr58570.x b/gcc/testsuite/gcc.c-torture/execute/pr58570.x
deleted file mode 100644
index 121fcfe..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/pr58570.x
+++ /dev/null
@@ -1,7 +0,0 @@
-load_lib target-supports.exp
-
-if { [check_effective_target_int16] } {
- return 1
-}
-
-return 0;
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr60822.c b/gcc/testsuite/gcc.c-torture/execute/pr60822.c
index d225331..dcd2447 100644
--- a/gcc/testsuite/gcc.c-torture/execute/pr60822.c
+++ b/gcc/testsuite/gcc.c-torture/execute/pr60822.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target int32plus } */
struct X {
char fill0[800000];
int a;
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr60822.x b/gcc/testsuite/gcc.c-torture/execute/pr60822.x
deleted file mode 100644
index 4efed4c..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/pr60822.x
+++ /dev/null
@@ -1,7 +0,0 @@
-load_lib target-supports.exp
-
-if { [check_effective_target_int32plus] } {
- return 0
-}
-
-return 1;
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr7284-1.c b/gcc/testsuite/gcc.c-torture/execute/pr7284-1.c
index de0057c..067f322 100644
--- a/gcc/testsuite/gcc.c-torture/execute/pr7284-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/pr7284-1.c
@@ -2,6 +2,7 @@
DR#081), not undefined. Bug 7284 from Al Grant (AlGrant at
myrealbox.com). */
+/* { dg-require-effective-target int32plus } */
/* { dg-options "-std=c89" } */
extern void abort (void);
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr7284-1.x b/gcc/testsuite/gcc.c-torture/execute/pr7284-1.x
deleted file mode 100644
index 121fcfe..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/pr7284-1.x
+++ /dev/null
@@ -1,7 +0,0 @@
-load_lib target-supports.exp
-
-if { [check_effective_target_int16] } {
- return 1
-}
-
-return 0;
diff --git a/gcc/testsuite/gcc.c-torture/execute/shiftdi.c b/gcc/testsuite/gcc.c-torture/execute/shiftdi.c
index 44f0dfc..7e04098 100644
--- a/gcc/testsuite/gcc.c-torture/execute/shiftdi.c
+++ b/gcc/testsuite/gcc.c-torture/execute/shiftdi.c
@@ -1,3 +1,5 @@
+/* { dg-require-effective-target int32plus } */
+
/* Failed on sparc with -mv8plus because sparc.c:set_extends() thought
erroneously that SImode ASHIFT chops the upper bits, it does not. */
diff --git a/gcc/testsuite/gcc.c-torture/execute/shiftdi.x b/gcc/testsuite/gcc.c-torture/execute/shiftdi.x
deleted file mode 100644
index 121fcfe..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/shiftdi.x
+++ /dev/null
@@ -1,7 +0,0 @@
-load_lib target-supports.exp
-
-if { [check_effective_target_int16] } {
- return 1
-}
-
-return 0;
diff --git a/gcc/testsuite/gcc.c-torture/execute/simd-4.c b/gcc/testsuite/gcc.c-torture/execute/simd-4.c
index 5b9c785..8a92cfe 100644
--- a/gcc/testsuite/gcc.c-torture/execute/simd-4.c
+++ b/gcc/testsuite/gcc.c-torture/execute/simd-4.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target stdint_types } */
#include <stdint.h>
typedef int32_t __attribute__((vector_size(8))) v2si;
int64_t s64;
diff --git a/gcc/testsuite/gcc.c-torture/execute/simd-4.x b/gcc/testsuite/gcc.c-torture/execute/simd-4.x
deleted file mode 100644
index 2e7510c..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/simd-4.x
+++ /dev/null
@@ -1,7 +0,0 @@
-load_lib target-supports.exp
-
-if { [check_effective_target_stdint_types] } {
- return 0
-}
-
-return 1;
diff --git a/gcc/testsuite/gcc.c-torture/execute/strncmp-1.c b/gcc/testsuite/gcc.c-torture/execute/strncmp-1.c
index dee904f..c5d39fd 100644
--- a/gcc/testsuite/gcc.c-torture/execute/strncmp-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/strncmp-1.c
@@ -1,3 +1,4 @@
+/* { dg-xfail-if "kernel strncmp does not perform unsigned comparisons" { vxworks_kernel } "*" "" } */
/* Copyright (C) 2002 Free Software Foundation.
Test strncmp with various combinations of pointer alignments and lengths to
diff --git a/gcc/testsuite/gcc.c-torture/execute/strncmp-1.x b/gcc/testsuite/gcc.c-torture/execute/strncmp-1.x
deleted file mode 100644
index b555e0c..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/strncmp-1.x
+++ /dev/null
@@ -1,16 +0,0 @@
-if {[istarget i?86-*-vxworks*]
- || [istarget mips*-*-vxworks*]
- || [istarget sh*-*-vxworks*]
- || [istarget sparc*-*-vxworks*]} {
- # The kernel strncmp doesn't perform unsigned comparisons.
- set torture_eval_before_execute {
- global compiler_conditional_xfail_data
- set compiler_conditional_xfail_data {
- "The kernel strncmp doesn't perform unsigned comparisons."
- { "*-*-*" }
- {}
- { "-mrtp" }
- }
- }
-}
-return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/usmul.c b/gcc/testsuite/gcc.c-torture/execute/usmul.c
index 28501b5..42b447a 100644
--- a/gcc/testsuite/gcc.c-torture/execute/usmul.c
+++ b/gcc/testsuite/gcc.c-torture/execute/usmul.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target int32plus } */
int __attribute__ ((noinline)) foo (short x, unsigned short y)
{
return x * y;
diff --git a/gcc/testsuite/gcc.c-torture/execute/usmul.x b/gcc/testsuite/gcc.c-torture/execute/usmul.x
deleted file mode 100644
index 121fcfe..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/usmul.x
+++ /dev/null
@@ -1,7 +0,0 @@
-load_lib target-supports.exp
-
-if { [check_effective_target_int16] } {
- return 1
-}
-
-return 0;
diff --git a/gcc/testsuite/gcc.c-torture/execute/vrp-5.c b/gcc/testsuite/gcc.c-torture/execute/vrp-5.c
index 8f3c725..8df557c 100644
--- a/gcc/testsuite/gcc.c-torture/execute/vrp-5.c
+++ b/gcc/testsuite/gcc.c-torture/execute/vrp-5.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target int32plus } */
extern void exit (int);
extern void abort ();
diff --git a/gcc/testsuite/gcc.c-torture/execute/vrp-5.x b/gcc/testsuite/gcc.c-torture/execute/vrp-5.x
deleted file mode 100644
index 121fcfe..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/vrp-5.x
+++ /dev/null
@@ -1,7 +0,0 @@
-load_lib target-supports.exp
-
-if { [check_effective_target_int16] } {
- return 1
-}
-
-return 0;
diff --git a/gcc/testsuite/gcc.c-torture/execute/vrp-6.c b/gcc/testsuite/gcc.c-torture/execute/vrp-6.c
index 7c6a175..90ebd2d 100644
--- a/gcc/testsuite/gcc.c-torture/execute/vrp-6.c
+++ b/gcc/testsuite/gcc.c-torture/execute/vrp-6.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target int32plus } */
#include <limits.h>
extern void exit (int);
diff --git a/gcc/testsuite/gcc.c-torture/execute/vrp-6.x b/gcc/testsuite/gcc.c-torture/execute/vrp-6.x
deleted file mode 100644
index 121fcfe..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/vrp-6.x
+++ /dev/null
@@ -1,7 +0,0 @@
-load_lib target-supports.exp
-
-if { [check_effective_target_int16] } {
- return 1
-}
-
-return 0;
diff --git a/gcc/testsuite/gcc.c-torture/execute/zerolen-2.c b/gcc/testsuite/gcc.c-torture/execute/zerolen-2.c
index 446e582..4a55acd 100644
--- a/gcc/testsuite/gcc.c-torture/execute/zerolen-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/zerolen-2.c
@@ -1,3 +1,4 @@
+/* { dg-skip-if "assumes absence of larger-than-word padding" { epiphany-*-* } "*" "" } */
extern void abort(void);
typedef int word __attribute__((mode(word)));
diff --git a/gcc/testsuite/gcc.c-torture/execute/zerolen-2.x b/gcc/testsuite/gcc.c-torture/execute/zerolen-2.x
deleted file mode 100644
index cee203d..0000000
--- a/gcc/testsuite/gcc.c-torture/execute/zerolen-2.x
+++ /dev/null
@@ -1,7 +0,0 @@
-if [istarget "epiphany-*-*"] {
- # This test assumes the absence of larger-than-word padding.
- # to make this true for struct foo on epiphany would require
- # __attribute__((packed,aligned(__alignof__(word)))) .
- return 1
-}
-return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/20111227-2.c b/gcc/testsuite/gcc.dg/20111227-2.c
similarity index 94%
rename from gcc/testsuite/gcc.c-torture/execute/20111227-2.c
rename to gcc/testsuite/gcc.dg/20111227-2.c
index 692c947..1266db3 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20111227-2.c
+++ b/gcc/testsuite/gcc.dg/20111227-2.c
@@ -1,6 +1,6 @@
/* Testcase derived from 20111227-1.c to ensure that REE is combining
redundant zero extends with zero extend to wider mode. */
-/* { dg-options "-fdump-rtl-ree -O" } */
+/* { dg-options "-fdump-rtl-ree -O -free" } */
extern void abort (void);
unsigned short s;
diff --git a/gcc/testsuite/gcc.c-torture/execute/20111227-3.c b/gcc/testsuite/gcc.dg/20111227-3.c
similarity index 94%
rename from gcc/testsuite/gcc.c-torture/execute/20111227-3.c
rename to gcc/testsuite/gcc.dg/20111227-3.c
index d6726c4..a750db3 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20111227-3.c
+++ b/gcc/testsuite/gcc.dg/20111227-3.c
@@ -1,6 +1,6 @@
/* Testcase derived from 20111227-1.c to ensure that REE is combining
redundant sign extends with sign extend to wider mode. */
-/* { dg-options "-fdump-rtl-ree -O" } */
+/* { dg-options "-fdump-rtl-ree -O -free" } */
extern void abort (void);
^ permalink raw reply [flat|nested] 16+ messages in thread