]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
d: Move all runnable tests in gdc.dg to gdc.dg/torture
authorIain Buclaw <ibuclaw@gdcproject.org>
Mon, 31 Aug 2020 16:23:12 +0000 (18:23 +0200)
committerIain Buclaw <ibuclaw@gdcproject.org>
Wed, 2 Sep 2020 20:59:34 +0000 (22:59 +0200)
Tests that are not executed do not need to be compiled as torture tests,
they are only present for testing for a certain bug or ICE.

gcc/testsuite/ChangeLog:

* gdc.dg/dg.exp: Remove torture options.
* gdc.dg/gdc115.d: Move test to gdc.dg/torture.
* gdc.dg/gdc131.d: Likewise.
* gdc.dg/gdc141.d: Likewise.
* gdc.dg/gdc17.d: Likewise.
* gdc.dg/gdc171.d: Likewise.
* gdc.dg/gdc179.d: Likewise.
* gdc.dg/gdc186.d: Likewise.
* gdc.dg/gdc187.d: Likewise.
* gdc.dg/gdc191.d: Likewise.
* gdc.dg/gdc198.d: Likewise.
* gdc.dg/gdc200.d: Likewise.
* gdc.dg/gdc210.d: Likewise.
* gdc.dg/gdc240.d: Likewise.
* gdc.dg/gdc242b.d: Likewise.
* gdc.dg/gdc248.d: Likewise.
* gdc.dg/gdc250.d: Likewise.
* gdc.dg/gdc273.d: Likewise.
* gdc.dg/gdc283.d: Likewise.
* gdc.dg/gdc285.d: Likewise.
* gdc.dg/gdc286.d: Likewise.
* gdc.dg/gdc309.d: Likewise.
* gdc.dg/gdc35.d: Likewise.
* gdc.dg/gdc36.d: Likewise.
* gdc.dg/gdc51.d: Likewise.
* gdc.dg/gdc57.d: Likewise.
* gdc.dg/gdc66.d: Likewise.
* gdc.dg/imports/gdc36.d: Likewise.
* gdc.dg/init1.d: Likewise.
* gdc.dg/pr92309.d: Likewise.
* gdc.dg/pr94424.d: Likewise.
* gdc.dg/pr94777b.d: Likewise.
* gdc.dg/pr96152.d: Likewise.
* gdc.dg/pr96153.d: Likewise.
* gdc.dg/pr96156.d: Likewise.
* gdc.dg/pr96157a.d: Likewise.
* gdc.dg/torture/torture.exp: New file.

37 files changed:
gcc/testsuite/gdc.dg/dg.exp
gcc/testsuite/gdc.dg/torture/gdc115.d [moved from gcc/testsuite/gdc.dg/gdc115.d with 89% similarity]
gcc/testsuite/gdc.dg/torture/gdc131.d [moved from gcc/testsuite/gdc.dg/gdc131.d with 89% similarity]
gcc/testsuite/gdc.dg/torture/gdc141.d [moved from gcc/testsuite/gdc.dg/gdc141.d with 89% similarity]
gcc/testsuite/gdc.dg/torture/gdc17.d [moved from gcc/testsuite/gdc.dg/gdc17.d with 95% similarity]
gcc/testsuite/gdc.dg/torture/gdc171.d [moved from gcc/testsuite/gdc.dg/gdc171.d with 95% similarity]
gcc/testsuite/gdc.dg/torture/gdc179.d [moved from gcc/testsuite/gdc.dg/gdc179.d with 93% similarity]
gcc/testsuite/gdc.dg/torture/gdc186.d [moved from gcc/testsuite/gdc.dg/gdc186.d with 97% similarity]
gcc/testsuite/gdc.dg/torture/gdc187.d [moved from gcc/testsuite/gdc.dg/gdc187.d with 94% similarity]
gcc/testsuite/gdc.dg/torture/gdc191.d [moved from gcc/testsuite/gdc.dg/gdc191.d with 99% similarity]
gcc/testsuite/gdc.dg/torture/gdc198.d [moved from gcc/testsuite/gdc.dg/gdc198.d with 97% similarity]
gcc/testsuite/gdc.dg/torture/gdc200.d [moved from gcc/testsuite/gdc.dg/gdc200.d with 90% similarity]
gcc/testsuite/gdc.dg/torture/gdc210.d [moved from gcc/testsuite/gdc.dg/gdc210.d with 97% similarity]
gcc/testsuite/gdc.dg/torture/gdc240.d [moved from gcc/testsuite/gdc.dg/gdc240.d with 89% similarity]
gcc/testsuite/gdc.dg/torture/gdc242b.d [moved from gcc/testsuite/gdc.dg/gdc242b.d with 91% similarity]
gcc/testsuite/gdc.dg/torture/gdc248.d [moved from gcc/testsuite/gdc.dg/gdc248.d with 94% similarity]
gcc/testsuite/gdc.dg/torture/gdc250.d [moved from gcc/testsuite/gdc.dg/gdc250.d with 90% similarity]
gcc/testsuite/gdc.dg/torture/gdc273.d [moved from gcc/testsuite/gdc.dg/gdc273.d with 91% similarity]
gcc/testsuite/gdc.dg/torture/gdc283.d [moved from gcc/testsuite/gdc.dg/gdc283.d with 96% similarity]
gcc/testsuite/gdc.dg/torture/gdc285.d [moved from gcc/testsuite/gdc.dg/gdc285.d with 91% similarity]
gcc/testsuite/gdc.dg/torture/gdc286.d [moved from gcc/testsuite/gdc.dg/gdc286.d with 95% similarity]
gcc/testsuite/gdc.dg/torture/gdc309.d [moved from gcc/testsuite/gdc.dg/gdc309.d with 96% similarity]
gcc/testsuite/gdc.dg/torture/gdc35.d [moved from gcc/testsuite/gdc.dg/gdc35.d with 97% similarity]
gcc/testsuite/gdc.dg/torture/gdc36.d [moved from gcc/testsuite/gdc.dg/gdc36.d with 98% similarity]
gcc/testsuite/gdc.dg/torture/gdc51.d [moved from gcc/testsuite/gdc.dg/gdc51.d with 93% similarity]
gcc/testsuite/gdc.dg/torture/gdc57.d [moved from gcc/testsuite/gdc.dg/gdc57.d with 90% similarity]
gcc/testsuite/gdc.dg/torture/gdc66.d [moved from gcc/testsuite/gdc.dg/gdc66.d with 87% similarity]
gcc/testsuite/gdc.dg/torture/imports/gdc36.d [moved from gcc/testsuite/gdc.dg/imports/gdc36.d with 100% similarity]
gcc/testsuite/gdc.dg/torture/init1.d [moved from gcc/testsuite/gdc.dg/init1.d with 83% similarity]
gcc/testsuite/gdc.dg/torture/pr92309.d [moved from gcc/testsuite/gdc.dg/pr92309.d with 91% similarity]
gcc/testsuite/gdc.dg/torture/pr94424.d [moved from gcc/testsuite/gdc.dg/pr94424.d with 93% similarity]
gcc/testsuite/gdc.dg/torture/pr94777b.d [moved from gcc/testsuite/gdc.dg/pr94777b.d with 99% similarity]
gcc/testsuite/gdc.dg/torture/pr96152.d [moved from gcc/testsuite/gdc.dg/pr96152.d with 96% similarity]
gcc/testsuite/gdc.dg/torture/pr96153.d [moved from gcc/testsuite/gdc.dg/pr96153.d with 97% similarity]
gcc/testsuite/gdc.dg/torture/pr96156.d [moved from gcc/testsuite/gdc.dg/pr96156.d with 93% similarity]
gcc/testsuite/gdc.dg/torture/pr96157a.d [moved from gcc/testsuite/gdc.dg/pr96157a.d with 90% similarity]
gcc/testsuite/gdc.dg/torture/torture.exp [new file with mode: 0644]

index 15cbe1c416855a554d20c7fda9a151c3afcbfb28..47a16da3f0aebb71b3b3910d0dc58c5eca910ef1 100644 (file)
 # 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
index 8eca2eb19c2b2a028b9a147b8851a5e3de4f712d..79693e8d32960a9e088b6caa055b40a52776e2a1 100644 (file)
@@ -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
index 394a90998e2f73e535fd18b42246aa51fcd308e6..63502ffceaeb6f95afc0e6fcd562482da8690dc4 100644 (file)
@@ -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
index 9a3d5c56c3e94979aea91ce8d416a80f503f7b8c..315811cda18a62a1b9e0fcc05596b08700f47e34 100644 (file)
@@ -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
index 0fd58479835d368ced6125826a81eb7280918ba6..cfc569429b8f5620e47642fd90ce7b9ef1e2065d 100644 (file)
@@ -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
index f8b7fde70a6e374096d589a3db632ff0062195cb..a6c5ea6986a64ca7632cd496c2f92aa17dbc13dc 100644 (file)
@@ -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
index 72fe0b74e4b1d4bbde2d5bf21d038093047e98ce..a64ca7d452a1ae1233952f0a4e841d12dbc75a7a 100644 (file)
@@ -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
index 4a1a91a709c832730a5a84ab20327cf4383f7e46..282167c51f207a5ea69dbbc316ec39d7ae95b596 100644 (file)
@@ -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
index 2f469ad81f68af7811de3dcd022add8960eeac46..60fbafc26a0df3543e0b255ee7ab219e6f5fc192 100644 (file)
@@ -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
index 4d2ca9df0ca40d59045056680e204d351ce2c95e..f414603cf7bfd7c504a9aaa070942b3197877a02 100644 (file)
@@ -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
index 09daf85045dc7ae4c6bb3485bb0adb8d64312ee0..144de6135f6eb44da594e8c8dff67d565028d5f5 100644 (file)
@@ -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
index 585d60fe76347392359b87d1e1c3358b33c0f74f..c41d8eac8aa350b98b1ad7caf65d5fd1502f0234 100644 (file)
@@ -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
index 0f560731b22d41d599ca92a430e35def4971f1a5..7c7dad8ce8368c0c75800e77d136118d75ae691c 100644 (file)
@@ -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
index 76f6dcf8db7502bc7fb4df9028ecdae3597a5d69..d37f23568a728e9e7abfa3c3ee8a590131d489f6 100644 (file)
@@ -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
index cfba4b484b345f79e7da3220baa7a5a2f99c4c52..d707051242684e8b75a08e872b7a54600d0278cc 100644 (file)
@@ -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
index 0fd0277bd468a123d1f911e8aedf80c332686c43..462b687487df96c72cf74502fd9c9dfe6bad93a8 100644 (file)
@@ -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
index c8182da8bb149c3fc92c866779c81c34deda4b83..c5b7d60dab619f7913ba04ce17b5a61df67688e3 100644 (file)
@@ -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
index b5d2b10359324fbde028e377d9ffbd0c24b733b6..268d8d0ce4a691774d7f1dd4f2285fc739d0f634 100644 (file)
@@ -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
index ca7ad3ff3f5b2db288e77ecb5f59efb3f11834da..f7316f79a491fb8bce5e9a0007a63e735d007913 100644 (file)
@@ -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
index f94ffb5f15235f51999a8119148c69b7a7e0cc08..30ea373b64c5b13b560e0c81e84c3b451675a112 100644 (file)
@@ -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
index 2536ef6e26a5e0ca58b08765266a49779c8e628c..9b6bc65be2dd3cdcfd2822b2f9625ecee67d7fa1 100644 (file)
@@ -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
index bbcb6e7a41292e0678cccd2584a39fb3f812704c..d14634a2f1fd020a71dcfeee6dd29f92a5a5cb8b 100644 (file)
@@ -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
index 773a78a73f52a11c42b05f55af0ff9d33b0f5cac..111e05612b4b40a0e3e6bc3afb267831847009d4 100644 (file)
@@ -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
index fbb876c28b33a5a8df99843c5c950d17ed40e493..3adb7f2fe989d92016806ee6e900824d98694efd 100644 (file)
@@ -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
index e6ffbd470b07e2eb18ea2caf544dc4eaf88db298..22f9bdad754de1530ccbd5b7605299fcea758da2 100644 (file)
@@ -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
index b378286066a816f9a3cf811d4a4c363b4e4f7c98..579067bc21275c3d3d8cbd14ed580acfaaff3379 100644 (file)
@@ -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
index f499c8352af8d568b0fb9307adbf880d824c2484..a59bcf68e6f062ed84373290cadafbfd9fd40f33 100644 (file)
@@ -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 83%
rename from gcc/testsuite/gdc.dg/init1.d
rename to gcc/testsuite/gdc.dg/torture/init1.d
index 679ad15460e0d35274ea4c37e08478090f5247b0..ce8c940a57be448034c704416df350959c5c976c 100644 (file)
@@ -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
index 01ebc40d336096963c805faf5e75230b27e77f2c..03ff21974eb9eb8753638f94cdcc0a796c89b38a 100644 (file)
@@ -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
index b9f9fac89571dccef62d10465f240a6d8b6847ef..2910c9ae139319a9956a08351b422d1604839e84 100644 (file)
@@ -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
index a230adb0cd94b70e7cc8ce553673c1fbb2c1cd82..2f0f9d9affbf15f19641b99fee2ea89662915b24 100644 (file)
@@ -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
index 3551614654b8d3f7c46324b83fc350353ddba840..86d3f9185d5a329b38fe5e52fbe1356eaff40e68 100644 (file)
@@ -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
index e1b8d816df0f91f56efc0513c767f74285c07436..c52b99a2f67896d806b595f01fc0866c130340bc 100644 (file)
@@ -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
index d9359b5bcff6d7168ebca061895d01ea85a5bdf5..ac4839497a9447ed6c8d0a732e62d8ff9caceab3 100644 (file)
@@ -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
index 11df19ea700cf462105e616a041631afac1e2d4a..0e9019cb9f4f9c09f940e31a3c90ebb437503106 100644 (file)
@@ -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
diff --git a/gcc/testsuite/gdc.dg/torture/torture.exp b/gcc/testsuite/gdc.dg/torture/torture.exp
new file mode 100644 (file)
index 0000000..d498818
--- /dev/null
@@ -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