@@ -19,32 +19,18 @@
# Load support procs.
load_lib gdc-dg.exp
-# The default option list can be overridden by
-# TORTURE_OPTIONS="{ { list1 } ... { listN } }"
-
-if ![info exists TORTURE_OPTIONS] {
- set TORTURE_OPTIONS [list \
- { -O0 } { -O1 } { -O2 } { -O3 } { -Os } \
- { -O0 -frelease } { -O0 -g } { -O0 -frelease -g } \
- { -O1 -frelease } { -O1 -g } { -O1 -frelease -g } \
- { -O2 -frelease } { -O2 -g } { -O2 -frelease -g } \
- { -O3 -frelease } { -O3 -g } { -O3 -frelease -g } \
- { -Os -frelease } { -Os -g } { -Os -frelease -g }]
+# If a testcase doesn't have special options, use these.
+global DEFAULT_DFLAGS
+if ![info exists DEFAULT_DFLAGS] then {
+ set DEFAULT_DFLAGS ""
}
# Initialize `dg'.
dg-init
-# Initialize use of torture lists.
-torture-init
-set-torture-options $TORTURE_OPTIONS
-
# Main loop.
gdc-dg-runtest [lsort \
- [glob -nocomplain $srcdir/$subdir/*.d ] ] "" ""
-
-# Finalize use of torture lists.
-torture-finish
+ [glob -nocomplain $srcdir/$subdir/*.d ] ] "" $DEFAULT_DFLAGS
# All done.
dg-finish
similarity index 89%
rename from gcc/testsuite/gdc.dg/gdc115.d
rename to gcc/testsuite/gdc.dg/torture/gdc115.d
@@ -1,5 +1,5 @@
// https://bugzilla.gdcproject.org/show_bug.cgi?id=115
-// { dg-do run { target hw } }
+// { dg-do run }
// { dg-skip-if "needs gcc/config.d" { ! d_runtime } }
void main()
similarity index 89%
rename from gcc/testsuite/gdc.dg/gdc131.d
rename to gcc/testsuite/gdc.dg/torture/gdc131.d
@@ -1,5 +1,5 @@
// https://bugzilla.gdcproject.org/show_bug.cgi?id=131
-// { dg-do run { target hw } }
+// { dg-do run }
// { dg-skip-if "needs gcc/config.d" { ! d_runtime } }
struct S131
similarity index 89%
rename from gcc/testsuite/gdc.dg/gdc141.d
rename to gcc/testsuite/gdc.dg/torture/gdc141.d
@@ -1,5 +1,5 @@
// https://bugzilla.gdcproject.org/show_bug.cgi?id=141
-// { dg-do run { target hw } }
+// { dg-do run }
// { dg-skip-if "needs gcc/config.d" { ! d_runtime } }
bool test141(int a)
similarity index 95%
rename from gcc/testsuite/gdc.dg/gdc17.d
rename to gcc/testsuite/gdc.dg/torture/gdc17.d
@@ -1,5 +1,5 @@
// https://bugzilla.gdcproject.org/show_bug.cgi?id=17
-// { dg-do run { target hw } }
+// { dg-do run }
// { dg-skip-if "needs gcc/config.d" { ! d_runtime } }
/**
similarity index 95%
rename from gcc/testsuite/gdc.dg/gdc171.d
rename to gcc/testsuite/gdc.dg/torture/gdc171.d
@@ -1,5 +1,5 @@
// https://bugzilla.gdcproject.org/show_bug.cgi?id=171
-// { dg-do run { target hw } }
+// { dg-do run }
// { dg-skip-if "needs gcc/config.d" { ! d_runtime } }
void test171a()
similarity index 93%
rename from gcc/testsuite/gdc.dg/gdc179.d
rename to gcc/testsuite/gdc.dg/torture/gdc179.d
@@ -1,5 +1,5 @@
// https://bugzilla.gdcproject.org/show_bug.cgi?id=179
-// { dg-do run { target hw } }
+// { dg-do run }
// { dg-skip-if "needs gcc/config.d" { ! d_runtime } }
import core.stdc.stdio;
similarity index 97%
rename from gcc/testsuite/gdc.dg/gdc186.d
rename to gcc/testsuite/gdc.dg/torture/gdc186.d
@@ -1,5 +1,5 @@
// https://bugzilla.gdcproject.org/show_bug.cgi?id=186
-// { dg-do run { target hw } }
+// { dg-do run }
// { dg-skip-if "needs gcc/config.d" { ! d_runtime } }
struct S186
similarity index 94%
rename from gcc/testsuite/gdc.dg/gdc187.d
rename to gcc/testsuite/gdc.dg/torture/gdc187.d
@@ -1,5 +1,5 @@
// https://bugzilla.gdcproject.org/show_bug.cgi?id=187
-// { dg-do run { target hw } }
+// { dg-do run }
// { dg-skip-if "needs gcc/config.d" { ! d_runtime } }
align(1) struct S187b
similarity index 99%
rename from gcc/testsuite/gdc.dg/gdc191.d
rename to gcc/testsuite/gdc.dg/torture/gdc191.d
@@ -1,5 +1,5 @@
// https://bugzilla.gdcproject.org/show_bug.cgi?id=191
-// { dg-do run { target hw } }
+// { dg-do run }
// { dg-skip-if "needs gcc/config.d" { ! d_runtime } }
class C191
similarity index 97%
rename from gcc/testsuite/gdc.dg/gdc198.d
rename to gcc/testsuite/gdc.dg/torture/gdc198.d
@@ -1,5 +1,5 @@
// https://bugzilla.gdcproject.org/show_bug.cgi?id=198
-// { dg-do run { target hw } }
+// { dg-do run }
// { dg-skip-if "needs gcc/config.d" { ! d_runtime } }
struct S198a
similarity index 90%
rename from gcc/testsuite/gdc.dg/gdc200.d
rename to gcc/testsuite/gdc.dg/torture/gdc200.d
@@ -1,5 +1,5 @@
// https://bugzilla.gdcproject.org/show_bug.cgi?id=200
-// { dg-do run { target hw } }
+// { dg-do run }
// { dg-skip-if "needs gcc/config.d" { ! d_runtime } }
void test200a(double x, double y)
similarity index 97%
rename from gcc/testsuite/gdc.dg/gdc210.d
rename to gcc/testsuite/gdc.dg/torture/gdc210.d
@@ -1,5 +1,5 @@
// https://bugzilla.gdcproject.org/show_bug.cgi?id=210
-// { dg-do run { target hw } }
+// { dg-do run }
// { dg-skip-if "needs gcc/config.d" { ! d_runtime } }
struct S210
similarity index 89%
rename from gcc/testsuite/gdc.dg/gdc240.d
rename to gcc/testsuite/gdc.dg/torture/gdc240.d
@@ -1,5 +1,5 @@
// https://bugzilla.gdcproject.org/show_bug.cgi?id=240
-// { dg-do run { target hw } }
+// { dg-do run }
// { dg-skip-if "needs gcc/config.d" { ! d_runtime } }
void test240(int a, int b)
similarity index 91%
rename from gcc/testsuite/gdc.dg/gdc242b.d
rename to gcc/testsuite/gdc.dg/torture/gdc242b.d
@@ -1,5 +1,5 @@
// https://bugzilla.gdcproject.org/show_bug.cgi?id=242
-// { dg-do run { target hw } }
+// { dg-do run }
// { dg-skip-if "needs gcc/config.d" { ! d_runtime } }
struct S242
similarity index 94%
rename from gcc/testsuite/gdc.dg/gdc248.d
rename to gcc/testsuite/gdc.dg/torture/gdc248.d
@@ -1,5 +1,5 @@
// https://bugzilla.gdcproject.org/show_bug.cgi?id=248
-// { dg-do run { target hw } }
+// { dg-do run }
// { dg-skip-if "needs gcc/config.d" { ! d_runtime } }
class C248b
similarity index 90%
rename from gcc/testsuite/gdc.dg/gdc250.d
rename to gcc/testsuite/gdc.dg/torture/gdc250.d
@@ -1,5 +1,5 @@
// https://bugzilla.gdcproject.org/show_bug.cgi?id=250
-// { dg-do run { target hw } }
+// { dg-do run }
// { dg-skip-if "needs gcc/config.d" { ! d_runtime } }
void main()
similarity index 91%
rename from gcc/testsuite/gdc.dg/gdc273.d
rename to gcc/testsuite/gdc.dg/torture/gdc273.d
@@ -1,5 +1,5 @@
// https://bugzilla.gdcproject.org/show_bug.cgi?id=273
-// { dg-do run { target hw } }
+// { dg-do run }
// { dg-skip-if "needs gcc/config.d" { ! d_runtime } }
class B273
similarity index 96%
rename from gcc/testsuite/gdc.dg/gdc283.d
rename to gcc/testsuite/gdc.dg/torture/gdc283.d
@@ -1,5 +1,6 @@
// https://bugzilla.gdcproject.org/show_bug.cgi?id=283
-// { dg-do run { target hw } }
+// { dg-do run }
+// { dg-skip-if "needs gcc/config.d" { ! d_runtime } }
struct Impl
{
similarity index 91%
rename from gcc/testsuite/gdc.dg/gdc285.d
rename to gcc/testsuite/gdc.dg/torture/gdc285.d
@@ -1,5 +1,5 @@
// https://bugzilla.gdcproject.org/show_bug.cgi?id=285
-// { dg-do run { target hw } }
+// { dg-do run }
// { dg-skip-if "needs gcc/config.d" { ! d_runtime } }
inout(char)[] test285(inout(char)* s) @nogc @system pure nothrow
similarity index 95%
rename from gcc/testsuite/gdc.dg/gdc286.d
rename to gcc/testsuite/gdc.dg/torture/gdc286.d
@@ -1,5 +1,5 @@
// https://bugzilla.gdcproject.org/show_bug.cgi?id=286
-// { dg-do run { target hw } }
+// { dg-do run }
// { dg-skip-if "needs gcc/config.d" { ! d_runtime } }
void main()
similarity index 96%
rename from gcc/testsuite/gdc.dg/gdc309.d
rename to gcc/testsuite/gdc.dg/torture/gdc309.d
@@ -1,5 +1,5 @@
// https://bugzilla.gdcproject.org/show_bug.cgi?id=309
-// { dg-do run { target hw } }
+// { dg-do run }
// { dg-skip-if "needs gcc/config.d" { ! d_runtime } }
void main()
similarity index 97%
rename from gcc/testsuite/gdc.dg/gdc35.d
rename to gcc/testsuite/gdc.dg/torture/gdc35.d
@@ -1,5 +1,5 @@
// https://bugzilla.gdcproject.org/show_bug.cgi?id=35
-// { dg-do run { target hw } }
+// { dg-do run }
// { dg-skip-if "needs gcc/config.d" { ! d_runtime } }
/**
similarity index 98%
rename from gcc/testsuite/gdc.dg/gdc36.d
rename to gcc/testsuite/gdc.dg/torture/gdc36.d
@@ -1,7 +1,7 @@
// https://bugzilla.gdcproject.org/show_bug.cgi?id=36
// { dg-additional-sources "imports/gdc36.d" }
// { dg-options "-I $srcdir/gdc.dg" }
-// { dg-do run { target hw } }
+// { dg-do run }
// { dg-skip-if "needs gcc/config.d" { ! d_runtime } }
module gdc36;
similarity index 93%
rename from gcc/testsuite/gdc.dg/gdc51.d
rename to gcc/testsuite/gdc.dg/torture/gdc51.d
@@ -1,5 +1,5 @@
// https://bugzilla.gdcproject.org/show_bug.cgi?id=51
-// { dg-do run { target hw } }
+// { dg-do run }
// { dg-skip-if "needs gcc/config.d" { ! d_runtime } }
struct S51
similarity index 90%
rename from gcc/testsuite/gdc.dg/gdc57.d
rename to gcc/testsuite/gdc.dg/torture/gdc57.d
@@ -1,5 +1,5 @@
// https://bugzilla.gdcproject.org/show_bug.cgi?id=57
-// { dg-do run { target hw } }
+// { dg-do run }
// { dg-skip-if "needs gcc/config.d" { ! d_runtime } }
struct S57
similarity index 87%
rename from gcc/testsuite/gdc.dg/gdc66.d
rename to gcc/testsuite/gdc.dg/torture/gdc66.d
@@ -1,5 +1,5 @@
// https://bugzilla.gdcproject.org/show_bug.cgi?id=66
-// { dg-do run { target hw } }
+// { dg-do run }
// { dg-skip-if "needs gcc/config.d" { ! d_runtime } }
void main()
similarity index 100%
rename from gcc/testsuite/gdc.dg/imports/gdc36.d
rename to gcc/testsuite/gdc.dg/torture/imports/gdc36.d
similarity index 83%
rename from gcc/testsuite/gdc.dg/init1.d
rename to gcc/testsuite/gdc.dg/torture/init1.d
@@ -1,4 +1,4 @@
-// { dg-do run { target hw } }
+// { dg-do run }
// { dg-options "-fno-druntime" }
// 'a' should not be default initialized to -1.
static char a = void;
similarity index 91%
rename from gcc/testsuite/gdc.dg/pr92309.d
rename to gcc/testsuite/gdc.dg/torture/pr92309.d
@@ -1,5 +1,5 @@
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92309
-// { dg-do run { target hw } }
+// { dg-do run }
// { dg-skip-if "needs gcc/config.d" { ! d_runtime } }
union U
similarity index 93%
rename from gcc/testsuite/gdc.dg/pr94424.d
rename to gcc/testsuite/gdc.dg/torture/pr94424.d
@@ -1,6 +1,6 @@
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94424
// { dg-additional-options "-fmain -funittest" }
-// { dg-do run { target hw } }
+// { dg-do run }
// { dg-skip-if "needs gcc/config.d" { ! d_runtime } }
@safe unittest
{
similarity index 99%
rename from gcc/testsuite/gdc.dg/pr94777b.d
rename to gcc/testsuite/gdc.dg/torture/pr94777b.d
@@ -1,6 +1,6 @@
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94777
// { dg-additional-options "-fmain -funittest" }
-// { dg-do run { target hw } }
+// { dg-do run }
// { dg-skip-if "needs gcc/config.d" { ! d_runtime } }
void testVariadic(T)(int nargs, ...)
similarity index 96%
rename from gcc/testsuite/gdc.dg/pr96152.d
rename to gcc/testsuite/gdc.dg/torture/pr96152.d
@@ -1,6 +1,6 @@
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96152
// { dg-additional-options "-fmain -funittest" }
-// { dg-do run { target hw } }
+// { dg-do run }
// { dg-skip-if "needs gcc/config.d" { ! d_runtime } }
auto assocArray(Keys, Values)(Keys keys, Values values)
{
similarity index 97%
rename from gcc/testsuite/gdc.dg/pr96153.d
rename to gcc/testsuite/gdc.dg/torture/pr96153.d
@@ -1,6 +1,6 @@
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96153
// { dg-additional-options "-fmain -funittest" }
-// { dg-do run { target hw } }
+// { dg-do run }
// { dg-skip-if "needs gcc/config.d" { ! d_runtime } }
struct Checked(T, Hook)
{
similarity index 93%
rename from gcc/testsuite/gdc.dg/pr96156.d
rename to gcc/testsuite/gdc.dg/torture/pr96156.d
@@ -1,5 +1,5 @@
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96156
-// { dg-do run { target hw } }
+// { dg-do run }
// { dg-skip-if "needs gcc/config.d" { ! d_runtime } }
struct S96156
similarity index 90%
rename from gcc/testsuite/gdc.dg/pr96157a.d
rename to gcc/testsuite/gdc.dg/torture/pr96157a.d
@@ -1,5 +1,5 @@
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96157
-// { dg-do run { target native } }
+// { dg-do run }
// { dg-skip-if "needs gcc/config.d" { ! d_runtime } }
struct S
new file mode 100644
@@ -0,0 +1,50 @@
+# Copyright (C) 2020 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+
+# This harness is for tests that should be run at all optimisation levels.
+
+# Load support procs.
+load_lib gdc-dg.exp
+
+# The default option list can be overridden by
+# TORTURE_OPTIONS="{ { list1 } ... { listN } }"
+
+if ![info exists TORTURE_OPTIONS] {
+ set TORTURE_OPTIONS [list \
+ { -O0 } { -O1 } { -O2 } { -O3 } { -Os } \
+ { -O0 -frelease } { -O0 -g } { -O0 -frelease -g } \
+ { -O1 -frelease } { -O1 -g } { -O1 -frelease -g } \
+ { -O2 -frelease } { -O2 -g } { -O2 -frelease -g } \
+ { -O3 -frelease } { -O3 -g } { -O3 -frelease -g } \
+ { -Os -frelease } { -Os -g } { -Os -frelease -g }]
+}
+
+# Initialize `dg'.
+dg-init
+
+# Initialize use of torture lists.
+torture-init
+set-torture-options $TORTURE_OPTIONS
+
+# Main loop.
+gdc-dg-runtest [lsort \
+ [glob -nocomplain $srcdir/$subdir/*.d ] ] "" ""
+
+# Finalize use of torture lists.
+torture-finish
+
+# All done.
+dg-finish