# 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
// 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()
// 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
// 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)
// 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 } }
/**
// 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()
// 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;
// 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
// 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
// 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
// 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
// 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)
// 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
// 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)
// 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
// 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
// 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()
// 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
// 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
{
// 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
// 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()
// 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()
// 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 } }
/**
// 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;
// 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
// 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
// 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()
-// { dg-do run { target hw } }
+// { dg-do run }
// { dg-options "-fno-druntime" }
// 'a' should not be default initialized to -1.
static char a = void;
// 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
// 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
{
// 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, ...)
// 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)
{
// 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)
{
// 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
// 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
--- /dev/null
+# 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