From: Iain Buclaw Date: Sat, 9 Jan 2021 22:25:44 +0000 (+0100) Subject: d: Synchronize testsuite with upstream dmd X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7da827c99c03adf3342a83a3c3ad3b72873154ce;p=gcc.git d: Synchronize testsuite with upstream dmd Adds TEST_OUTPUT directives and reduces the verbosity of many tests. Reviewed-on: https://github.com/dlang/dmd/pull/12112 gcc/d/ChangeLog: * dmd/MERGE: Merge upstream dmd cb1106ad5. --- diff --git a/gcc/d/dmd/MERGE b/gcc/d/dmd/MERGE index a34fd4138d7..435bf31e8b0 100644 --- a/gcc/d/dmd/MERGE +++ b/gcc/d/dmd/MERGE @@ -1,4 +1,4 @@ -9bba772fa67c6864e551bc87097402f691d947d4 +cb1106ad5bea4293cd302b0ba1f3ce08905d40fe The first line of this file holds the git revision number of the last merge done from the dlang/dmd repository. diff --git a/gcc/testsuite/gdc.test/compilable/99bottles.d b/gcc/testsuite/gdc.test/compilable/99bottles.d index e7d2f77500e..09360a8bec2 100644 --- a/gcc/testsuite/gdc.test/compilable/99bottles.d +++ b/gcc/testsuite/gdc.test/compilable/99bottles.d @@ -2,7 +2,7 @@ // http://www.digitalmars.com/d/archives/digitalmars/D/announce/4374.html // http://www.99-bottles-of-beer.net/language-d-1212.html -// Displays the "99 bottles of beer" song at compile time, +// Generates the "99 bottles of beer" song at compile time, // using the template metaprograming facilities of D. // No executable is generated. No libraries are used. // Illustrates template default values, template string value parameters, @@ -49,4 +49,505 @@ template beer(int maxbeers, int n = maxbeers) ~ showHowMany!( maxbeers, " on the wall."); } -pragma(msg, beer!(99)); +enum expected = `99 bottles of beer on the wall, +99 bottles of beer. +Take one down and pass it around, +98 bottles of beer on the wall. + +98 bottles of beer on the wall, +98 bottles of beer. +Take one down and pass it around, +97 bottles of beer on the wall. + +97 bottles of beer on the wall, +97 bottles of beer. +Take one down and pass it around, +96 bottles of beer on the wall. + +96 bottles of beer on the wall, +96 bottles of beer. +Take one down and pass it around, +95 bottles of beer on the wall. + +95 bottles of beer on the wall, +95 bottles of beer. +Take one down and pass it around, +94 bottles of beer on the wall. + +94 bottles of beer on the wall, +94 bottles of beer. +Take one down and pass it around, +93 bottles of beer on the wall. + +93 bottles of beer on the wall, +93 bottles of beer. +Take one down and pass it around, +92 bottles of beer on the wall. + +92 bottles of beer on the wall, +92 bottles of beer. +Take one down and pass it around, +91 bottles of beer on the wall. + +91 bottles of beer on the wall, +91 bottles of beer. +Take one down and pass it around, +90 bottles of beer on the wall. + +90 bottles of beer on the wall, +90 bottles of beer. +Take one down and pass it around, +89 bottles of beer on the wall. + +89 bottles of beer on the wall, +89 bottles of beer. +Take one down and pass it around, +88 bottles of beer on the wall. + +88 bottles of beer on the wall, +88 bottles of beer. +Take one down and pass it around, +87 bottles of beer on the wall. + +87 bottles of beer on the wall, +87 bottles of beer. +Take one down and pass it around, +86 bottles of beer on the wall. + +86 bottles of beer on the wall, +86 bottles of beer. +Take one down and pass it around, +85 bottles of beer on the wall. + +85 bottles of beer on the wall, +85 bottles of beer. +Take one down and pass it around, +84 bottles of beer on the wall. + +84 bottles of beer on the wall, +84 bottles of beer. +Take one down and pass it around, +83 bottles of beer on the wall. + +83 bottles of beer on the wall, +83 bottles of beer. +Take one down and pass it around, +82 bottles of beer on the wall. + +82 bottles of beer on the wall, +82 bottles of beer. +Take one down and pass it around, +81 bottles of beer on the wall. + +81 bottles of beer on the wall, +81 bottles of beer. +Take one down and pass it around, +80 bottles of beer on the wall. + +80 bottles of beer on the wall, +80 bottles of beer. +Take one down and pass it around, +79 bottles of beer on the wall. + +79 bottles of beer on the wall, +79 bottles of beer. +Take one down and pass it around, +78 bottles of beer on the wall. + +78 bottles of beer on the wall, +78 bottles of beer. +Take one down and pass it around, +77 bottles of beer on the wall. + +77 bottles of beer on the wall, +77 bottles of beer. +Take one down and pass it around, +76 bottles of beer on the wall. + +76 bottles of beer on the wall, +76 bottles of beer. +Take one down and pass it around, +75 bottles of beer on the wall. + +75 bottles of beer on the wall, +75 bottles of beer. +Take one down and pass it around, +74 bottles of beer on the wall. + +74 bottles of beer on the wall, +74 bottles of beer. +Take one down and pass it around, +73 bottles of beer on the wall. + +73 bottles of beer on the wall, +73 bottles of beer. +Take one down and pass it around, +72 bottles of beer on the wall. + +72 bottles of beer on the wall, +72 bottles of beer. +Take one down and pass it around, +71 bottles of beer on the wall. + +71 bottles of beer on the wall, +71 bottles of beer. +Take one down and pass it around, +70 bottles of beer on the wall. + +70 bottles of beer on the wall, +70 bottles of beer. +Take one down and pass it around, +69 bottles of beer on the wall. + +69 bottles of beer on the wall, +69 bottles of beer. +Take one down and pass it around, +68 bottles of beer on the wall. + +68 bottles of beer on the wall, +68 bottles of beer. +Take one down and pass it around, +67 bottles of beer on the wall. + +67 bottles of beer on the wall, +67 bottles of beer. +Take one down and pass it around, +66 bottles of beer on the wall. + +66 bottles of beer on the wall, +66 bottles of beer. +Take one down and pass it around, +65 bottles of beer on the wall. + +65 bottles of beer on the wall, +65 bottles of beer. +Take one down and pass it around, +64 bottles of beer on the wall. + +64 bottles of beer on the wall, +64 bottles of beer. +Take one down and pass it around, +63 bottles of beer on the wall. + +63 bottles of beer on the wall, +63 bottles of beer. +Take one down and pass it around, +62 bottles of beer on the wall. + +62 bottles of beer on the wall, +62 bottles of beer. +Take one down and pass it around, +61 bottles of beer on the wall. + +61 bottles of beer on the wall, +61 bottles of beer. +Take one down and pass it around, +60 bottles of beer on the wall. + +60 bottles of beer on the wall, +60 bottles of beer. +Take one down and pass it around, +59 bottles of beer on the wall. + +59 bottles of beer on the wall, +59 bottles of beer. +Take one down and pass it around, +58 bottles of beer on the wall. + +58 bottles of beer on the wall, +58 bottles of beer. +Take one down and pass it around, +57 bottles of beer on the wall. + +57 bottles of beer on the wall, +57 bottles of beer. +Take one down and pass it around, +56 bottles of beer on the wall. + +56 bottles of beer on the wall, +56 bottles of beer. +Take one down and pass it around, +55 bottles of beer on the wall. + +55 bottles of beer on the wall, +55 bottles of beer. +Take one down and pass it around, +54 bottles of beer on the wall. + +54 bottles of beer on the wall, +54 bottles of beer. +Take one down and pass it around, +53 bottles of beer on the wall. + +53 bottles of beer on the wall, +53 bottles of beer. +Take one down and pass it around, +52 bottles of beer on the wall. + +52 bottles of beer on the wall, +52 bottles of beer. +Take one down and pass it around, +51 bottles of beer on the wall. + +51 bottles of beer on the wall, +51 bottles of beer. +Take one down and pass it around, +50 bottles of beer on the wall. + +50 bottles of beer on the wall, +50 bottles of beer. +Take one down and pass it around, +49 bottles of beer on the wall. + +49 bottles of beer on the wall, +49 bottles of beer. +Take one down and pass it around, +48 bottles of beer on the wall. + +48 bottles of beer on the wall, +48 bottles of beer. +Take one down and pass it around, +47 bottles of beer on the wall. + +47 bottles of beer on the wall, +47 bottles of beer. +Take one down and pass it around, +46 bottles of beer on the wall. + +46 bottles of beer on the wall, +46 bottles of beer. +Take one down and pass it around, +45 bottles of beer on the wall. + +45 bottles of beer on the wall, +45 bottles of beer. +Take one down and pass it around, +44 bottles of beer on the wall. + +44 bottles of beer on the wall, +44 bottles of beer. +Take one down and pass it around, +43 bottles of beer on the wall. + +43 bottles of beer on the wall, +43 bottles of beer. +Take one down and pass it around, +42 bottles of beer on the wall. + +42 bottles of beer on the wall, +42 bottles of beer. +Take one down and pass it around, +41 bottles of beer on the wall. + +41 bottles of beer on the wall, +41 bottles of beer. +Take one down and pass it around, +40 bottles of beer on the wall. + +40 bottles of beer on the wall, +40 bottles of beer. +Take one down and pass it around, +39 bottles of beer on the wall. + +39 bottles of beer on the wall, +39 bottles of beer. +Take one down and pass it around, +38 bottles of beer on the wall. + +38 bottles of beer on the wall, +38 bottles of beer. +Take one down and pass it around, +37 bottles of beer on the wall. + +37 bottles of beer on the wall, +37 bottles of beer. +Take one down and pass it around, +36 bottles of beer on the wall. + +36 bottles of beer on the wall, +36 bottles of beer. +Take one down and pass it around, +35 bottles of beer on the wall. + +35 bottles of beer on the wall, +35 bottles of beer. +Take one down and pass it around, +34 bottles of beer on the wall. + +34 bottles of beer on the wall, +34 bottles of beer. +Take one down and pass it around, +33 bottles of beer on the wall. + +33 bottles of beer on the wall, +33 bottles of beer. +Take one down and pass it around, +32 bottles of beer on the wall. + +32 bottles of beer on the wall, +32 bottles of beer. +Take one down and pass it around, +31 bottles of beer on the wall. + +31 bottles of beer on the wall, +31 bottles of beer. +Take one down and pass it around, +30 bottles of beer on the wall. + +30 bottles of beer on the wall, +30 bottles of beer. +Take one down and pass it around, +29 bottles of beer on the wall. + +29 bottles of beer on the wall, +29 bottles of beer. +Take one down and pass it around, +28 bottles of beer on the wall. + +28 bottles of beer on the wall, +28 bottles of beer. +Take one down and pass it around, +27 bottles of beer on the wall. + +27 bottles of beer on the wall, +27 bottles of beer. +Take one down and pass it around, +26 bottles of beer on the wall. + +26 bottles of beer on the wall, +26 bottles of beer. +Take one down and pass it around, +25 bottles of beer on the wall. + +25 bottles of beer on the wall, +25 bottles of beer. +Take one down and pass it around, +24 bottles of beer on the wall. + +24 bottles of beer on the wall, +24 bottles of beer. +Take one down and pass it around, +23 bottles of beer on the wall. + +23 bottles of beer on the wall, +23 bottles of beer. +Take one down and pass it around, +22 bottles of beer on the wall. + +22 bottles of beer on the wall, +22 bottles of beer. +Take one down and pass it around, +21 bottles of beer on the wall. + +21 bottles of beer on the wall, +21 bottles of beer. +Take one down and pass it around, +20 bottles of beer on the wall. + +20 bottles of beer on the wall, +20 bottles of beer. +Take one down and pass it around, +19 bottles of beer on the wall. + +19 bottles of beer on the wall, +19 bottles of beer. +Take one down and pass it around, +18 bottles of beer on the wall. + +18 bottles of beer on the wall, +18 bottles of beer. +Take one down and pass it around, +17 bottles of beer on the wall. + +17 bottles of beer on the wall, +17 bottles of beer. +Take one down and pass it around, +16 bottles of beer on the wall. + +16 bottles of beer on the wall, +16 bottles of beer. +Take one down and pass it around, +15 bottles of beer on the wall. + +15 bottles of beer on the wall, +15 bottles of beer. +Take one down and pass it around, +14 bottles of beer on the wall. + +14 bottles of beer on the wall, +14 bottles of beer. +Take one down and pass it around, +13 bottles of beer on the wall. + +13 bottles of beer on the wall, +13 bottles of beer. +Take one down and pass it around, +12 bottles of beer on the wall. + +12 bottles of beer on the wall, +12 bottles of beer. +Take one down and pass it around, +11 bottles of beer on the wall. + +11 bottles of beer on the wall, +11 bottles of beer. +Take one down and pass it around, +10 bottles of beer on the wall. + +10 bottles of beer on the wall, +10 bottles of beer. +Take one down and pass it around, +9 bottles of beer on the wall. + +9 bottles of beer on the wall, +9 bottles of beer. +Take one down and pass it around, +8 bottles of beer on the wall. + +8 bottles of beer on the wall, +8 bottles of beer. +Take one down and pass it around, +7 bottles of beer on the wall. + +7 bottles of beer on the wall, +7 bottles of beer. +Take one down and pass it around, +6 bottles of beer on the wall. + +6 bottles of beer on the wall, +6 bottles of beer. +Take one down and pass it around, +5 bottles of beer on the wall. + +5 bottles of beer on the wall, +5 bottles of beer. +Take one down and pass it around, +4 bottles of beer on the wall. + +4 bottles of beer on the wall, +4 bottles of beer. +Take one down and pass it around, +3 bottles of beer on the wall. + +3 bottles of beer on the wall, +3 bottles of beer. +Take one down and pass it around, +2 bottles of beer on the wall. + +2 bottles of beer on the wall, +2 bottles of beer. +Take one down and pass it around, +1 bottle of beer on the wall. + +1 bottle of beer on the wall, +1 bottle of beer. +Take one down and pass it around, +no more bottles of beer on the wall. + +No more bottles of beer on the wall, +no more bottles of beer. +Go to the store and buy some more, +99 bottles of beer on the wall. +`; + +static assert(beer!(99) == expected); diff --git a/gcc/testsuite/gdc.test/compilable/b16382.d b/gcc/testsuite/gdc.test/compilable/b16382.d index 08726cb8272..e28ad181b5d 100644 --- a/gcc/testsuite/gdc.test/compilable/b16382.d +++ b/gcc/testsuite/gdc.test/compilable/b16382.d @@ -1,4 +1,10 @@ // REQUIRED_ARGS: -c +/* +TEST_OUTPUT: +--- +&this +--- +*/ struct S0 { void foo() { pragma(msg, &this); diff --git a/gcc/testsuite/gdc.test/compilable/b17111.d b/gcc/testsuite/gdc.test/compilable/b17111.d index 54091249d60..6bf5da9f3e2 100644 --- a/gcc/testsuite/gdc.test/compilable/b17111.d +++ b/gcc/testsuite/gdc.test/compilable/b17111.d @@ -1,3 +1,10 @@ +/* +TEST_OUTPUT: +--- +compilable/b17111.d(16): Deprecation: `case` variables have to be `const` or `immutable` +compilable/b17111.d(17): Deprecation: `case` variables have to be `const` or `immutable` +--- +*/ alias TestType = ubyte; void test() diff --git a/gcc/testsuite/gdc.test/compilable/compile1.d b/gcc/testsuite/gdc.test/compilable/compile1.d index 61669c2090c..86d84af617a 100644 --- a/gcc/testsuite/gdc.test/compilable/compile1.d +++ b/gcc/testsuite/gdc.test/compilable/compile1.d @@ -15,9 +15,9 @@ static assert(C1748!int.stringof == "C1748!int"); **************************************************/ version(all) - pragma(msg, "true"); + pragma(inline, true); else - pragma(msg, "false"); + pragma(inline, false); /************************************************** 2438 @@ -78,7 +78,7 @@ template ice8982(T) void bug8982(ref const int v = 7){} static if (is(typeof(bug8982) P == __parameters)) { - pragma(msg, ((P[0..1] g) => g[0])()); + enum eval8982 = ((P[0..1] g) => g[0])(); } } @@ -275,7 +275,7 @@ void main() try { } - catch + catch(.object.Throwable) { } } @@ -298,7 +298,7 @@ void test11939() **************************************************/ template A(B) { - pragma(msg, "missing ;") + pragma(lib, "missing ;") enum X = 0; } @@ -766,7 +766,7 @@ struct A12799 /***************************************************/ // 13236 -pragma(msg, is(typeof({ struct S { S x; } }))); +enum bug13286 = is(typeof({ struct S { S x; } })); /***************************************************/ // 13280 @@ -857,14 +857,15 @@ X14166[int] makeAA14166() { return aa14166; } struct Tup14166(T...) { T field; alias field this; } Tup14166!(int, int) tup14166; Tup14166!(int, int) makeTup14166() { return tup14166; } - -pragma(msg, typeof((s14166.x += 1) = 2)); // ok <- error -pragma(msg, typeof(s14166.a.length += 2)); // ok <- error -pragma(msg, typeof(s14166++)); // ok <- error -pragma(msg, typeof(s14166.x ^^ 2)); // ok <- error -pragma(msg, typeof(s14166.y ^^= 2.5)); // ok <- error -pragma(msg, typeof(makeAA14166()[0] = 1)); // ok <- error -pragma(msg, typeof(tup14166.field = makeTup14166())); // ok <- error +alias TT14166(T...) = T; + +static assert(is(typeof((s14166.x += 1) = 2) == int)); // ok <- error +static assert(is(typeof(s14166.a.length += 2) == size_t)); // ok <- error +static assert(is(typeof(s14166++) == S14166)); // ok <- error +static assert(is(typeof(s14166.x ^^ 2) == int)); // ok <- error +static assert(is(typeof(s14166.y ^^= 2.5) == double)); // ok <- error +static assert(is(typeof(makeAA14166()[0] = 1) == X14166)); // ok <- error +static assert(is(typeof(tup14166.field = makeTup14166()) == TT14166!(int, int))); // ok <- error /***************************************************/ // 14388 diff --git a/gcc/testsuite/gdc.test/compilable/ddoc3.d b/gcc/testsuite/gdc.test/compilable/ddoc3.d index bc00b69e83e..1bcae411232 100644 --- a/gcc/testsuite/gdc.test/compilable/ddoc3.d +++ b/gcc/testsuite/gdc.test/compilable/ddoc3.d @@ -1,7 +1,7 @@ // EXTRA_SOURCES: extra-files/ddoc3.ddoc // PERMUTE_ARGS: // REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o- -// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 3 +// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh /** * Summary diff --git a/gcc/testsuite/gdc.test/compilable/imports/test15117a.d b/gcc/testsuite/gdc.test/compilable/imports/test15117a.d deleted file mode 100644 index 9daf6f187d4..00000000000 --- a/gcc/testsuite/gdc.test/compilable/imports/test15117a.d +++ /dev/null @@ -1,9 +0,0 @@ -module imports.test15117a; - -struct AssertResult {} - -auto test_usr_1() -{ - // 2. generate TyepInfoStructDeclaration - auto x = typeid(AssertResult); -} diff --git a/gcc/testsuite/gdc.test/compilable/interpret3.d b/gcc/testsuite/gdc.test/compilable/interpret3.d index 6e7304d742e..a2830ea11c2 100644 --- a/gcc/testsuite/gdc.test/compilable/interpret3.d +++ b/gcc/testsuite/gdc.test/compilable/interpret3.d @@ -1,4 +1,11 @@ -// PERMUTE_ARGS: -inline +// PERMUTE_ARGS: -inline +/* +TEST_OUTPUT: +--- +compilable/interpret3.d(2914): Deprecation: `case` variables have to be `const` or `immutable` +compilable/interpret3.d(6351): Deprecation: identity comparison of static arrays implicitly coerces them to slices, which are compared by reference +--- +*/ template compiles(int T) { diff --git a/gcc/testsuite/gdc.test/compilable/test11563.d b/gcc/testsuite/gdc.test/compilable/test11563.d index b208215bdb6..6fb39fed44d 100644 --- a/gcc/testsuite/gdc.test/compilable/test11563.d +++ b/gcc/testsuite/gdc.test/compilable/test11563.d @@ -3,7 +3,7 @@ import imports.test11563std_traits; interface J : I {} // comment out to let compilation succeed struct A { } -pragma(msg, moduleName!A); +static assert(moduleName!A == "b"); interface I {} diff --git a/gcc/testsuite/gdc.test/compilable/test12527.d b/gcc/testsuite/gdc.test/compilable/test12527.d index b075b9ede03..b476c176283 100644 --- a/gcc/testsuite/gdc.test/compilable/test12527.d +++ b/gcc/testsuite/gdc.test/compilable/test12527.d @@ -2,9 +2,7 @@ @system: alias Fun = void function() @safe; - pragma (msg, Fun.stringof); static assert(Fun.stringof == "void function() @safe"); alias Del = void delegate() @safe; - pragma (msg, Del.stringof); static assert(Del.stringof == "void delegate() @safe"); diff --git a/gcc/testsuite/gdc.test/compilable/test15019.d b/gcc/testsuite/gdc.test/compilable/test15019.d index c2948759a14..963dba8fc37 100644 --- a/gcc/testsuite/gdc.test/compilable/test15019.d +++ b/gcc/testsuite/gdc.test/compilable/test15019.d @@ -42,15 +42,15 @@ alias mat4x4 mat4; string definePostfixAliases(string type) { return "alias " ~ type ~ "!byte " ~ type ~ "b;\n" -"alias " ~ type ~ "!ubyte " ~ type ~ "ub;\n" -"alias " ~ type ~ "!short " ~ type ~ "s;\n" -"alias " ~ type ~ "!ushort " ~ type ~ "us;\n" -"alias " ~ type ~ "!int " ~ type ~ "i;\n" -"alias " ~ type ~ "!uint " ~ type ~ "ui;\n" -"alias " ~ type ~ "!long " ~ type ~ "l;\n" -"alias " ~ type ~ "!ulong " ~ type ~ "ul;\n" -"alias " ~ type ~ "!float " ~ type ~ "f;\n" -"alias " ~ type ~ "!double " ~ type ~ "d;\n"; +~ "alias " ~ type ~ "!ubyte " ~ type ~ "ub;\n" +~ "alias " ~ type ~ "!short " ~ type ~ "s;\n" +~ "alias " ~ type ~ "!ushort " ~ type ~ "us;\n" +~ "alias " ~ type ~ "!int " ~ type ~ "i;\n" +~ "alias " ~ type ~ "!uint " ~ type ~ "ui;\n" +~ "alias " ~ type ~ "!long " ~ type ~ "l;\n" +~ "alias " ~ type ~ "!ulong " ~ type ~ "ul;\n" +~ "alias " ~ type ~ "!float " ~ type ~ "f;\n" +~ "alias " ~ type ~ "!double " ~ type ~ "d;\n"; } // define a lot of type names diff --git a/gcc/testsuite/gdc.test/compilable/test15177.d b/gcc/testsuite/gdc.test/compilable/test15177.d deleted file mode 100644 index 0bb2d0498c6..00000000000 --- a/gcc/testsuite/gdc.test/compilable/test15177.d +++ /dev/null @@ -1,23 +0,0 @@ -// REQUIRED_ARGS: -o- -// PERMUTE_ARGS: -// EXTRA_SOURCES: imports/test15117a.d - -import users = imports.test15117a; - -void RunApiTest(T...)() -{ - foreach (name; __traits(allMembers, users)) - { - // 3. list the name of TyepInfoStructDeclaration, - // but it's just internal symbol and invisible. - mixin("alias func = users . " ~ name ~ ";"); - } -} - -void main() -{ - // 1. run semantic3 of users.test_usr_1 - users.test_usr_1(); - - RunApiTest!(); -} diff --git a/gcc/testsuite/gdc.test/compilable/test15326.d b/gcc/testsuite/gdc.test/compilable/test15326.d index 05c942b2432..c88f5d08f9c 100644 --- a/gcc/testsuite/gdc.test/compilable/test15326.d +++ b/gcc/testsuite/gdc.test/compilable/test15326.d @@ -5,19 +5,19 @@ private struct _NestedSym_ { static if ((void*).sizeof == 8) { - pragma(msg, "64"); + int pointersize = 64; } else { - pragma(msg, "32"); + int pointersize = 32; } version (X86_64) { - pragma(msg, "X86_64"); + string arch = "X86_64"; } else { - pragma(msg, "Not 64"); + string arch = "Not 64"; } } diff --git a/gcc/testsuite/gdc.test/compilable/test16525.d b/gcc/testsuite/gdc.test/compilable/test16525.d index 6c85e0cad5f..e4ce7effc36 100644 --- a/gcc/testsuite/gdc.test/compilable/test16525.d +++ b/gcc/testsuite/gdc.test/compilable/test16525.d @@ -12,8 +12,8 @@ extern(C++) struct CPP void test() { - pragma(msg, templ!(D.memvar)); - pragma(msg, templ!(CPP.memvar)); - // root cause, C++ member variables have no mangling - pragma(msg, CPP.memvar.mangleof); + static assert(templ!(D.memvar) == 1234); + static assert(templ!(CPP.memvar) == 1234); + // ICE: root cause, C++ member variables have no mangling + enum CPPmemvar = CPP.memvar.mangleof; } diff --git a/gcc/testsuite/gdc.test/compilable/test17143.d b/gcc/testsuite/gdc.test/compilable/test17143.d index 403c9aa456c..98e31f4c324 100644 --- a/gcc/testsuite/gdc.test/compilable/test17143.d +++ b/gcc/testsuite/gdc.test/compilable/test17143.d @@ -1,4 +1,4 @@ import std.typecons : tuple; enum foo = tuple(1, 2).expand; -pragma(msg, typeof(foo).stringof); -pragma(msg, foo.stringof); +static assert(typeof(foo).stringof == "(int, int)"); +static assert(foo.stringof == "tuple(1, 2)"); diff --git a/gcc/testsuite/gdc.test/compilable/testDIP37.d b/gcc/testsuite/gdc.test/compilable/testDIP37.d index 7188758414c..38bce3850f2 100644 --- a/gcc/testsuite/gdc.test/compilable/testDIP37.d +++ b/gcc/testsuite/gdc.test/compilable/testDIP37.d @@ -34,7 +34,6 @@ void test7() static import pkgDIP37.datetime; static assert(!__traits(compiles, def())); pkgDIP37.datetime.def(); - pkgDIP37.datetime.common.def(); } // https://issues.dlang.org/show_bug.cgi?id=17629 diff --git a/gcc/testsuite/gdc.test/compilable/testInference.d b/gcc/testsuite/gdc.test/compilable/testInference.d index 5a8e1e26ac6..3248f3e1035 100644 --- a/gcc/testsuite/gdc.test/compilable/testInference.d +++ b/gcc/testsuite/gdc.test/compilable/testInference.d @@ -653,7 +653,7 @@ void foo10296()() void bar()() { a[1] = 2; } bar(); - pragma(msg, typeof(bar!())); // nothrow @safe void() + static assert(typeof(bar!()).stringof == "pure nothrow @nogc @safe void()"); // nothrow @safe void() } pure void test10296() { @@ -811,7 +811,7 @@ void test13840() nothrow func13840(); // throwable function call } } - catch + catch(Throwable) {} } diff --git a/gcc/testsuite/gdc.test/compilable/testheader1.d b/gcc/testsuite/gdc.test/compilable/testheader1.d index c46728d64c9..256a1fe0bd9 100644 --- a/gcc/testsuite/gdc.test/compilable/testheader1.d +++ b/gcc/testsuite/gdc.test/compilable/testheader1.d @@ -1,6 +1,12 @@ // EXTRA_SOURCES: extra-files/header1.d // REQUIRED_ARGS: -o- -unittest -H -Hf${RESULTS_DIR}/compilable/header1.di // PERMUTE_ARGS: -d -dw -// POST_SCRIPT: compilable/extra-files/header-postscript.sh header1 +// POST_SCRIPT: compilable/extra-files/header-postscript.sh +/* +TEST_OUTPUT: +--- +Hello World +--- +*/ void main() {} diff --git a/gcc/testsuite/gdc.test/compilable/testheader1i.d b/gcc/testsuite/gdc.test/compilable/testheader1i.d index 98599925965..0eca3c44c19 100644 --- a/gcc/testsuite/gdc.test/compilable/testheader1i.d +++ b/gcc/testsuite/gdc.test/compilable/testheader1i.d @@ -1,6 +1,12 @@ // EXTRA_SOURCES: extra-files/header1.d // REQUIRED_ARGS: -o- -H -Hf${RESULTS_DIR}/compilable/header1i.di -inline // PERMUTE_ARGS: -d -dw -// POST_SCRIPT: compilable/extra-files/header-postscript.sh header1i +// POST_SCRIPT: compilable/extra-files/header-postscript.sh +/* +TEST_OUTPUT: +--- +Hello World +--- +*/ void main() {} diff --git a/gcc/testsuite/gdc.test/compilable/testparse.d b/gcc/testsuite/gdc.test/compilable/testparse.d index d6713ad40c2..f5141464692 100644 --- a/gcc/testsuite/gdc.test/compilable/testparse.d +++ b/gcc/testsuite/gdc.test/compilable/testparse.d @@ -4,7 +4,7 @@ /***************************************************/ // 6719 -pragma(msg, __traits(compiles, mixin("(const(A))[0..0]"))); +static assert(__traits(compiles, mixin("(const(A))[0..0]")) == false); /***************************************************/ // 9232 diff --git a/gcc/testsuite/gdc.test/fail_compilation/bug5.d b/gcc/testsuite/gdc.test/fail_compilation/bug5.d index 7878af75b54..b2f7d1d375e 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/bug5.d +++ b/gcc/testsuite/gdc.test/fail_compilation/bug5.d @@ -1,4 +1,9 @@ -// REQUIRED_ARGS: +/* +TEST_OUTPUT: +--- +fail_compilation/bug5.d(8): Error: function `bug5.test1` no `return exp;` or `assert(0);` at end of function +--- +*/ int test1() { diff --git a/gcc/testsuite/gdc.test/fail_compilation/bug5b.d b/gcc/testsuite/gdc.test/fail_compilation/bug5b.d index ca7ddd905e4..8ba5717548f 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/bug5b.d +++ b/gcc/testsuite/gdc.test/fail_compilation/bug5b.d @@ -1,4 +1,9 @@ -// REQUIRED_ARGS: +/* +TEST_OUTPUT: +--- +fail_compilation/bug5b.d(8): Error: function `bug5b.test1` has no `return` statement, but is expected to return a value of type `int` +--- +*/ int test1() { diff --git a/gcc/testsuite/gdc.test/fail_compilation/bug8150a.d b/gcc/testsuite/gdc.test/fail_compilation/bug8150a.d index 906b73c3fcc..a03f850ae80 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/bug8150a.d +++ b/gcc/testsuite/gdc.test/fail_compilation/bug8150a.d @@ -1,4 +1,11 @@ -// Bugzilla 8150: nothrow check doesn't work for constructor +// https://issues.dlang.org/show_bug.cgi?id=8150: nothrow check doesn't work for constructor +/* +TEST_OUTPUT: +--- +fail_compilation/bug8150a.d(14): Error: `object.Exception` is thrown but not caught +fail_compilation/bug8150a.d(12): Error: `nothrow` constructor `bug8150a.Foo.this` may throw +--- +*/ struct Foo { diff --git a/gcc/testsuite/gdc.test/fail_compilation/bug8150b.d b/gcc/testsuite/gdc.test/fail_compilation/bug8150b.d index b861aeecc8b..2091bc8cc2d 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/bug8150b.d +++ b/gcc/testsuite/gdc.test/fail_compilation/bug8150b.d @@ -1,4 +1,12 @@ -// Bugzilla 8150: nothrow check doesn't work for constructor +// https://issues.dlang.org/show_bug.cgi?id=8150: nothrow check doesn't work for constructor +/* +TEST_OUTPUT: +--- +fail_compilation/bug8150b.d(15): Error: `object.Exception` is thrown but not caught +fail_compilation/bug8150b.d(13): Error: `nothrow` constructor `bug8150b.Foo.__ctor!().this` may throw +fail_compilation/bug8150b.d(20): Error: template instance `bug8150b.Foo.__ctor!()` error instantiating +--- +*/ struct Foo { diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag10327.d b/gcc/testsuite/gdc.test/fail_compilation/diag10327.d index 1d163c770ea..38f9ccbe12b 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/diag10327.d +++ b/gcc/testsuite/gdc.test/fail_compilation/diag10327.d @@ -1 +1,11 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/diag10327.d(11): Error: module `test10327` is in file 'imports/test10327.d' which cannot be read +import path[0] = fail_compilation +import path[1] = $p:druntime/import$ +import path[2] = $p:phobos$ +--- +*/ + import imports.test10327; // package.d missing diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag15713.d b/gcc/testsuite/gdc.test/fail_compilation/diag15713.d index 14f2d8432b4..a7714c9d852 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/diag15713.d +++ b/gcc/testsuite/gdc.test/fail_compilation/diag15713.d @@ -1,4 +1,5 @@ /* +TEST_OUTPUT: --- fail_compilation/diag15713.d(18): Error: no property 'widthSign' for type 'Data' fail_compilation/diag15713.d(38): Error: template instance test.conwritefImpl!("parse-int", "width", "\x0a", Data()) error instantiating diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail104.d b/gcc/testsuite/gdc.test/fail_compilation/fail104.d index 7e455f37532..2111844d56d 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail104.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail104.d @@ -1,6 +1,14 @@ // Issue 76 - Using a non-template struct as a template // Compiling leads to "Assertion failure: 's->parent' on line 1694 in file // 'template.c'" +/* +TEST_OUTPUT: +--- +fail_compilation/fail104.d(26): Error: template instance `P!()` `P` is not a template declaration, it is a alias +fail_compilation/fail104.d(26): Error: mixin `fail104.C!(S).C.T!()` is not defined +fail_compilation/fail104.d(31): Error: template instance `fail104.C!(S)` error instantiating +--- +*/ struct S { diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail10905.d b/gcc/testsuite/gdc.test/fail_compilation/fail10905.d index 2028648d308..6181d946bd5 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail10905.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail10905.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail10905.d(20): Error: incompatible types for `(this.x) == (cast(const(__vector(long[2])))cast(__vector(long[2]))1L)`: both operands are of type `const(__vector(long[2]))` +--- +*/ struct Foo { diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail115.d b/gcc/testsuite/gdc.test/fail_compilation/fail115.d index e9d5a67d293..4990b66f1f9 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail115.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail115.d @@ -1,4 +1,11 @@ -// Issue 402 - compiler crash with mixin and forward reference +// https://issues.dlang.org/show_bug.cgi?id=402 +// compiler crash with mixin and forward reference +/* +TEST_OUTPUT: +--- +fail_compilation/fail115.d(17): Error: mixin `Foo!y` cannot resolve forward reference +--- +*/ template Foo(alias b) { diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail11503a.d b/gcc/testsuite/gdc.test/fail_compilation/fail11503a.d index 28f7befdf91..b49cde9330b 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail11503a.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail11503a.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail11503a.d(24): Error: cannot implicitly convert expression `makes()` of type `immutable(S)*` to `S*` +--- +*/ struct S { immutable(S)* s; diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail11503b.d b/gcc/testsuite/gdc.test/fail_compilation/fail11503b.d index 80549de8e6c..ebfbbfdc447 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail11503b.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail11503b.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail11503b.d(17): Error: cannot implicitly convert expression `makes()` of type `immutable(int[])` to `int[]` +--- +*/ immutable int[] x = [1, 2, 3]; auto makes() pure diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail11503c.d b/gcc/testsuite/gdc.test/fail_compilation/fail11503c.d index dc45eefc093..ad3963f4e15 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail11503c.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail11503c.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail11503c.d(19): Error: cannot implicitly convert expression `d.filename()` of type `const(char)[]` to `string` +--- +*/ struct Data { char[256] buffer; diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail11503d.d b/gcc/testsuite/gdc.test/fail_compilation/fail11503d.d index d96e2a8b249..d1605b27822 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail11503d.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail11503d.d @@ -1,3 +1,10 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail11503d.d(26): Error: cannot implicitly convert expression `filename(d)` of type `const(char)[]` to `string` +fail_compilation/fail11503d.d(27): Error: cannot implicitly convert expression `filename2(& d)` of type `const(char)[]` to `string` +--- +*/ struct Data2 { char buffer; diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail12.d b/gcc/testsuite/gdc.test/fail_compilation/fail12.d index ad38cd790b8..aa060e68d29 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail12.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail12.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail12.d(17): Error: function `fail12.main.Foo!(y).abc` at fail_compilation/fail12.d(9) conflicts with function `fail12.main.Foo!(y).abc` at fail_compilation/fail12.d(9) +--- +*/ template Foo(alias b) { int abc() { return b; } diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail121.d b/gcc/testsuite/gdc.test/fail_compilation/fail121.d index 4bc8179d282..70e9d0cd4be 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail121.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail121.d @@ -1,5 +1,12 @@ // PERMUTE_ARGS: -d -dw // segfault on DMD0.150, never failed if use typeid() instead. +/* +TEST_OUTPUT: +--- +fail_compilation/fail121.d(23): Error: no property `typeinfo` for type `fail121.myobject` +fail_compilation/fail121.d(23): Error: no property `typeinfo` for type `int` +--- +*/ struct myobject { diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail12485.d b/gcc/testsuite/gdc.test/fail_compilation/fail12485.d deleted file mode 100644 index e1b15774f81..00000000000 --- a/gcc/testsuite/gdc.test/fail_compilation/fail12485.d +++ /dev/null @@ -1,12 +0,0 @@ -void dorecursive() -{ - recursive!"ratherLongSymbolNameToHitTheMaximumSymbolLengthEarlierThanTheTemplateRecursionLimit_"; -} - -void recursive(string name)() -{ - struct S {} // define type to kick off mangler - static if (name.length <= (4 << 20)) - recursive!(name ~ name); -} - diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail137.d b/gcc/testsuite/gdc.test/fail_compilation/fail137.d deleted file mode 100644 index 80a2a25a51a..00000000000 --- a/gcc/testsuite/gdc.test/fail_compilation/fail137.d +++ /dev/null @@ -1,23 +0,0 @@ -// 751 Compiler segfault on template expansion - - template TypeTuple( TList... ) - { - alias TList TypeTuple; - } - - template IndexOf( T, TList... ) - { - static if( TList.length == 0 ) - const size_t IndexOf = 1; - else static if( is( T == typeof( TList[0] ) ) ) - const size_t IndexOf = 0; - else - const size_t IndexOf = 1 + IndexOf!( T, (TList[1 .. $]) ); - } - - void main() - { - TypeTuple!(int, long) T; - printf( "%u\n", IndexOf!(long, T) ); - } - diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail14.d b/gcc/testsuite/gdc.test/fail_compilation/fail14.d index 0da6dc4b134..a44d41cb80a 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail14.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail14.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail14.d(10): Error: template instance `fail14.A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!int))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))` recursive expansion exceeded allowed nesting limit +--- +*/ class A(T) { diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail14486.d b/gcc/testsuite/gdc.test/fail_compilation/fail14486.d index ca209aa5b98..84af9cfbbd4 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail14486.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail14486.d @@ -1,5 +1,44 @@ // REQUIRED_ARGS: -o- +/* +TEST_OUTPUT: +--- +fail_compilation/fail14486.d(56): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead. +fail_compilation/fail14486.d(56): Error: `delete c0` is not `@safe` but is used in `@safe` function `test1a` +fail_compilation/fail14486.d(57): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead. +fail_compilation/fail14486.d(57): Error: `pure` function `fail14486.test1a` cannot call impure destructor `fail14486.C1a.~this` +fail_compilation/fail14486.d(57): Error: `@safe` function `fail14486.test1a` cannot call `@system` destructor `fail14486.C1a.~this` +fail_compilation/fail14486.d(43): `fail14486.C1a.~this` is declared here +fail_compilation/fail14486.d(57): Error: `@nogc` function `fail14486.test1a` cannot call non-@nogc destructor `fail14486.C1a.~this` +fail_compilation/fail14486.d(62): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead. +fail_compilation/fail14486.d(63): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead. +fail_compilation/fail14486.d(63): Error: destructor `fail14486.C1b.~this` is not `nothrow` +fail_compilation/fail14486.d(60): Error: `nothrow` function `fail14486.test1b` may throw +fail_compilation/fail14486.d(68): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead. +fail_compilation/fail14486.d(68): Error: `delete s0` is not `@safe` but is used in `@safe` function `test2a` +fail_compilation/fail14486.d(69): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead. +fail_compilation/fail14486.d(69): Error: `pure` function `fail14486.test2a` cannot call impure destructor `fail14486.S1a.~this` +fail_compilation/fail14486.d(69): Error: `@safe` function `fail14486.test2a` cannot call `@system` destructor `fail14486.S1a.~this` +fail_compilation/fail14486.d(49): `fail14486.S1a.~this` is declared here +fail_compilation/fail14486.d(69): Error: `@nogc` function `fail14486.test2a` cannot call non-@nogc destructor `fail14486.S1a.~this` +fail_compilation/fail14486.d(74): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead. +fail_compilation/fail14486.d(75): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead. +fail_compilation/fail14486.d(75): Error: destructor `fail14486.S1b.~this` is not `nothrow` +fail_compilation/fail14486.d(72): Error: `nothrow` function `fail14486.test2b` may throw +fail_compilation/fail14486.d(80): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead. +fail_compilation/fail14486.d(80): Error: `delete a0` is not `@safe` but is used in `@safe` function `test3a` +fail_compilation/fail14486.d(81): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead. +fail_compilation/fail14486.d(81): Error: `pure` function `fail14486.test3a` cannot call impure destructor `fail14486.S1a.~this` +fail_compilation/fail14486.d(81): Error: `@safe` function `fail14486.test3a` cannot call `@system` destructor `fail14486.S1a.~this` +fail_compilation/fail14486.d(49): `fail14486.S1a.~this` is declared here +fail_compilation/fail14486.d(81): Error: `@nogc` function `fail14486.test3a` cannot call non-@nogc destructor `fail14486.S1a.~this` +fail_compilation/fail14486.d(86): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead. +fail_compilation/fail14486.d(87): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead. +fail_compilation/fail14486.d(87): Error: destructor `fail14486.S1b.~this` is not `nothrow` +fail_compilation/fail14486.d(84): Error: `nothrow` function `fail14486.test3b` may throw +--- +*/ + class C0a { } class C1a { ~this() {} } class C2a { ~this() {} @nogc pure @safe delete(void* p) {} } diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail15.d b/gcc/testsuite/gdc.test/fail_compilation/fail15.d index 564ddda7eec..0386b9a2675 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail15.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail15.d @@ -1,4 +1,10 @@ /* +TEST_OUTPUT: +--- +fail_compilation/fail15.d(24): Error: cannot use `[]` operator on expression of type `void` +--- +*/ +/* Segfault on DMD 0.095 http://www.digitalmars.com/d/archives/digitalmars/D/bugs/926.html */ diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail15616b.d b/gcc/testsuite/gdc.test/fail_compilation/fail15616b.d index 53defaea1c3..4776f40439c 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail15616b.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail15616b.d @@ -1,5 +1,6 @@ /* REQUIRED_ARGS: -v +TEST_OUTPUT: --- fail_compilation/fail15616b.d(43): Error: none of the overloads of 'foo' are callable using argument types (double), candidates are: fail_compilation/fail15616b.d(16): fail15616b.foo(int a) diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail16.d b/gcc/testsuite/gdc.test/fail_compilation/fail16.d index c9af9d30088..6c7a90a625e 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail16.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail16.d @@ -1,4 +1,11 @@ // ICE(template.c) in DMD0.080 +/* +TEST_OUTPUT: +--- +fail_compilation/fail16.d(19): Error: function declaration without return type. (Note that constructors are always named `this`) +fail_compilation/fail16.d(19): Error: no identifier for declarator `bar!(typeof(X))(X)` +--- +*/ int i; diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail17.d b/gcc/testsuite/gdc.test/fail_compilation/fail17.d index fa3b4888c12..2c73d30886f 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail17.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail17.d @@ -1,3 +1,11 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail17.d(11): Error: undefined identifier `B` +fail_compilation/fail17.d(11): Error: mixin `fail17.A!int.A.B!(T, A!T)` is not defined +fail_compilation/fail17.d(14): Error: template instance `fail17.A!int` error instantiating +--- +*/ struct A(T) { mixin B!(T, A!(T)); diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail196.d b/gcc/testsuite/gdc.test/fail_compilation/fail196.d index 2a2812bb479..78fc3615c95 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail196.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail196.d @@ -1,3 +1,25 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail196.d(26): Error: delimited string must end in )" +fail_compilation/fail196.d(26): Error: Implicit string concatenation is error-prone and disallowed in D +fail_compilation/fail196.d(26): Use the explicit syntax instead (concatenating literals is `@nogc`): "foo(xxx)" ~ ";\x0a assert(s == " +fail_compilation/fail196.d(27): Error: semicolon expected, not `foo` +fail_compilation/fail196.d(27): Error: found `");\x0a\x0a s = q"` when expecting `;` following statement +fail_compilation/fail196.d(29): Error: found `";\x0a assert(s == "` when expecting `;` following statement +fail_compilation/fail196.d(30): Error: found `");\x0a\x0a s = q"` when expecting `;` following statement +fail_compilation/fail196.d(32): Error: found `{` when expecting `;` following statement +fail_compilation/fail196.d(32): Error: found `}` when expecting `;` following statement +fail_compilation/fail196.d(33): Error: found `foo` when expecting `;` following statement +fail_compilation/fail196.d(33): Error: found `}` when expecting `;` following statement +fail_compilation/fail196.d(35): Error: found `<` when expecting `;` following statement +fail_compilation/fail196.d(36): Error: found `foo` when expecting `;` following statement +fail_compilation/fail196.d(36): Error: found `<` instead of statement +fail_compilation/fail196.d(42): Error: unterminated string constant starting at fail_compilation/fail196.d(42) +fail_compilation/fail196.d(44): Error: found `End of File` when expecting `}` following compound statement +fail_compilation/fail196.d(44): Error: found `End of File` when expecting `}` following compound statement +--- +*/ void main() { diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail19890a.d b/gcc/testsuite/gdc.test/fail_compilation/fail19890a.d index 57c4caf34ab..2120dc56997 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail19890a.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail19890a.d @@ -1,5 +1,6 @@ // PERMUTE_ARGS: /* +TEST_OUTPUT: --- fail_compilation/fail19890a.d(8): Error: `void[/^[0-9]+(LU)?$/]` size 1 * /^[0-9]+$/ exceeds 0x7fffffff size limit for static array --- diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail19890b.d b/gcc/testsuite/gdc.test/fail_compilation/fail19890b.d index a9b18741833..c3ee67793a3 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail19890b.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail19890b.d @@ -1,5 +1,6 @@ // PERMUTE_ARGS: /* +TEST_OUTPUT: --- fail_compilation/fail19890b.d(8): Error: `void[/^[0-9]+(LU)?$/]` size 1 * /^[0-9]+$/ exceeds 0x7fffffff size limit for static array --- diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail199.d b/gcc/testsuite/gdc.test/fail_compilation/fail199.d index e293aa1c92c..9cb14b801c9 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail199.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail199.d @@ -1,4 +1,11 @@ // REQUIRED_ARGS: -de +/* +TEST_OUTPUT: +--- +fail_compilation/fail199.d(20): Deprecation: class `fail199.DepClass` is deprecated +fail_compilation/fail199.d(20): Deprecation: class `fail199.DepClass` is deprecated +--- +*/ //import std.stdio; diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail200.d b/gcc/testsuite/gdc.test/fail_compilation/fail200.d index c0ba46ca96f..9d804a916b3 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail200.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail200.d @@ -1,4 +1,11 @@ // REQUIRED_ARGS: -de +/* +TEST_OUTPUT: +--- +fail_compilation/fail200.d(17): Deprecation: interface `fail200.DepClass` is deprecated +fail_compilation/fail200.d(17): Deprecation: interface `fail200.DepClass` is deprecated +--- +*/ //import std.stdio; diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail201.d b/gcc/testsuite/gdc.test/fail_compilation/fail201.d index d9655b3bc27..6c4d923e248 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail201.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail201.d @@ -1,3 +1,10 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail201.d(10): Error: shift by 33 is outside the range `0..31` +fail_compilation/fail201.d(10): Error: shift by 33 is outside the range `0..31` +--- +*/ void main() { int c; c = c >>> 33; diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail202.d b/gcc/testsuite/gdc.test/fail_compilation/fail202.d index 78cf21a9e84..57009edfee5 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail202.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail202.d @@ -1,3 +1,10 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail202.d(10): Error: shift by 33 is outside the range `0..31` +fail_compilation/fail202.d(10): Error: shift by 33 is outside the range `0..31` +--- +*/ void main() { int c; c = c >> 33; diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail203.d b/gcc/testsuite/gdc.test/fail_compilation/fail203.d index 3d96e0cba1f..51accf5b9f1 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail203.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail203.d @@ -1,3 +1,10 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail203.d(10): Error: shift by 33 is outside the range `0..31` +fail_compilation/fail203.d(10): Error: shift by 33 is outside the range `0..31` +--- +*/ void main() { int c; c = c << 33; diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail204.d b/gcc/testsuite/gdc.test/fail_compilation/fail204.d index 41b7c297fb3..e6f2faaa4bf 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail204.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail204.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail204.d(9): Error: shift assign by 65 is outside the range `0..63` +--- +*/ void main() { long c; c >>= 65; diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail205.d b/gcc/testsuite/gdc.test/fail_compilation/fail205.d index 04ef95ead00..89ddc93fea1 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail205.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail205.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail205.d(9): Error: shift assign by 65 is outside the range `0..63` +--- +*/ void main() { long c; c <<= 65; diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail206.d b/gcc/testsuite/gdc.test/fail_compilation/fail206.d index 6c0bf4630af..e3b2dcee9f4 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail206.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail206.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail206.d(9): Error: shift assign by 65 is outside the range `0..63` +--- +*/ void main() { long c; c >>>= 65; diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail217.d b/gcc/testsuite/gdc.test/fail_compilation/fail217.d index 67c28cd8f40..63ed0a06d02 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail217.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail217.d @@ -1,3 +1,10 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail217.d(22): Error: mutable method `fail217.Message.this` is not callable using a `immutable` object +fail_compilation/fail217.d(13): Consider adding `const` or `inout` here +--- +*/ class Message { diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail220.d b/gcc/testsuite/gdc.test/fail_compilation/fail220.d index 5e2f1305eb1..294dc21b33e 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail220.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail220.d @@ -1,3 +1,13 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail220.d(12): Error: identifier expected for template value parameter +fail_compilation/fail220.d(12): Error: found `==` when expecting `)` +fail_compilation/fail220.d(12): Error: found `class` when expecting `)` +fail_compilation/fail220.d(12): Error: declaration expected, not `)` +fail_compilation/fail220.d(16): Error: unrecognized declaration +--- +*/ template types (T) { static if (is (T V : V[K], K == class)) { static assert (false, "assoc"); diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail225.d b/gcc/testsuite/gdc.test/fail_compilation/fail225.d index 6cf59f3556c..dee9a543b6e 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail225.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail225.d @@ -1,3 +1,10 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail225.d(15): Error: cannot implicitly convert expression `1` of type `int` to `immutable(char*)` +fail_compilation/fail225.d(15): Error: cannot implicitly convert expression `& ch` of type `char*` to `immutable(char*)` +--- +*/ struct Struct { char* chptr; } diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail232.d b/gcc/testsuite/gdc.test/fail_compilation/fail232.d index ee2f4312097..d2e68d451f3 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail232.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail232.d @@ -1,3 +1,14 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail232.d(15): Error: shift by 33 is outside the range `0..31` +fail_compilation/fail232.d(15): Error: shift by 33 is outside the range `0..31` +fail_compilation/fail232.d(16): Error: shift by 33 is outside the range `0..31` +fail_compilation/fail232.d(16): Error: shift by 33 is outside the range `0..31` +fail_compilation/fail232.d(17): Error: shift by 33 is outside the range `0..31` +fail_compilation/fail232.d(17): Error: shift by 33 is outside the range `0..31` +--- +*/ void bug1601() { int i; diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail239.d b/gcc/testsuite/gdc.test/fail_compilation/fail239.d index 81fbca2bfd4..14b6443528f 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail239.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail239.d @@ -1,2 +1,8 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail239.d(8): Error: type `F` is not an expression +--- +*/ class F { int x; } alias typeof(F).x b; diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail252.d b/gcc/testsuite/gdc.test/fail_compilation/fail252.d index 3d2db651076..e9ea2bf7fe0 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail252.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail252.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail252.d(13): Error: cannot implicitly override base class method `fail252.Timer.Task.run` with `fail252.Timer.__anonclass1.run`; add `override` attribute +--- +*/ class Timer { abstract class Task { public abstract void run(); diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail257.d b/gcc/testsuite/gdc.test/fail_compilation/fail257.d index 249a5240244..0e2d6699572 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail257.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail257.d @@ -1 +1,8 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail257.d(8): Error: incompatible types for `("foo"d) == ("bar"c)`: `dstring` and `string` +fail_compilation/fail257.d(8): while evaluating `pragma(msg, "foo"d == "bar"c ? "A" : "B")` +--- +*/ pragma(msg, "foo"d == "bar"c ? "A" : "B"); diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail258.d b/gcc/testsuite/gdc.test/fail_compilation/fail258.d index 97381a66394..459d2715c26 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail258.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail258.d @@ -1,3 +1,13 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail258.d(11): Error: delimiter cannot be whitespace +fail_compilation/fail258.d(11): Error: delimited string must end in +" +fail_compilation/fail258.d(11): Error: declaration expected, not `"X"` +fail_compilation/fail258.d(14): Error: unterminated string constant starting at fail_compilation/fail258.d(14) +--- +*/ q" X diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail2740.d b/gcc/testsuite/gdc.test/fail_compilation/fail2740.d index af7334fa71b..340be528110 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail2740.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail2740.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail2740.d(17): Error: class `fail2740.Foo` ambiguous virtual function `foo` +--- +*/ interface IFoo { int foo(); diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail276.d b/gcc/testsuite/gdc.test/fail_compilation/fail276.d index 052558ce0d8..4f9b7c34c0a 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail276.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail276.d @@ -1,3 +1,10 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail276.d(19): Error: `this` has no effect +fail_compilation/fail276.d(15): Error: `this` is only defined in non-static member functions, not `__anonclass2` +--- +*/ class C { diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail279.d b/gcc/testsuite/gdc.test/fail_compilation/fail279.d index 22d795e9e0c..8fa7aa49efc 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail279.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail279.d @@ -1,4 +1,12 @@ -// Issue 2920 - recursive templates blow compiler stack +/* +TEST_OUTPUT: +--- +fail_compilation/fail279.d(14): Error: mixin `fail279.Template!0.Template!1.Template!2.Template!3.Template!4.Template!5.Template!6.Template!7.Template!8.Template!9.Template!10.Template!11.Template!12.Template!13.Template!14.Template!15.Template!16.Template!17.Template!18.Template!19.Template!20.Template!21.Template!22.Template!23.Template!24.Template!25.Template!26.Template!27.Template!28.Template!29.Template!30.Template!31.Template!32.Template!33.Template!34.Template!35.Template!36.Template!37.Template!38.Template!39.Template!40.Template!41.Template!42.Template!43.Template!44.Template!45.Template!46.Template!47.Template!48.Template!49.Template!50.Template!51.Template!52.Template!53.Template!54.Template!55.Template!56.Template!57.Template!58.Template!59.Template!60.Template!61.Template!62.Template!63.Template!64.Template!65.Template!66.Template!67.Template!68.Template!69.Template!70.Template!71.Template!72.Template!73.Template!74.Template!75.Template!76.Template!77.Template!78.Template!79.Template!80.Template!81.Template!82.Template!83.Template!84.Template!85.Template!86.Template!87.Template!88.Template!89.Template!90.Template!91.Template!92.Template!93.Template!94.Template!95.Template!96.Template!97.Template!98.Template!99.Template!100.Template!101.Template!102.Template!103.Template!104.Template!105.Template!106.Template!107.Template!108.Template!109.Template!110.Template!111.Template!112.Template!113.Template!114.Template!115.Template!116.Template!117.Template!118.Template!119.Template!120.Template!121.Template!122.Template!123.Template!124.Template!125.Template!126.Template!127.Template!128.Template!129.Template!130.Template!131.Template!132.Template!133.Template!134.Template!135.Template!136.Template!137.Template!138.Template!139.Template!140.Template!141.Template!142.Template!143.Template!144.Template!145.Template!146.Template!147.Template!148.Template!149.Template!150.Template!151.Template!152.Template!153.Template!154.Template!155.Template!156.Template!157.Template!158.Template!159.Template!160.Template!161.Template!162.Template!163.Template!164.Template!165.Template!166.Template!167.Template!168.Template!169.Template!170.Template!171.Template!172.Template!173.Template!174.Template!175.Template!176.Template!177.Template!178.Template!179.Template!180.Template!181.Template!182.Template!183.Template!184.Template!185.Template!186.Template!187.Template!188.Template!189.Template!190.Template!191.Template!192.Template!193.Template!194.Template!195.Template!196.Template!197.Template!198.Template!199.Template!200.Template!201.Template!202.Template!203.Template!204.Template!205.Template!206.Template!207.Template!208.Template!209.Template!210.Template!211.Template!212.Template!213.Template!214.Template!215.Template!216.Template!217.Template!218.Template!219.Template!220.Template!221.Template!222.Template!223.Template!224.Template!225.Template!226.Template!227.Template!228.Template!229.Template!230.Template!231.Template!232.Template!233.Template!234.Template!235.Template!236.Template!237.Template!238.Template!239.Template!240.Template!241.Template!242.Template!243.Template!244.Template!245.Template!246.Template!247.Template!248.Template!249.Template!250.Template!251.Template!252.Template!253.Template!254.Template!255.Template!256.Template!257.Template!258.Template!259.Template!260.Template!261.Template!262.Template!263.Template!264.Template!265.Template!266.Template!267.Template!268.Template!269.Template!270.Template!271.Template!272.Template!273.Template!274.Template!275.Template!276.Template!277.Template!278.Template!279.Template!280.Template!281.Template!282.Template!283.Template!284.Template!285.Template!286.Template!287.Template!288.Template!289.Template!290.Template!291.Template!292.Template!293.Template!294.Template!295.Template!296.Template!297.Template!298.Template!299.Template!300.Template!301.Template!302.Template!303.Template!304.Template!305.Template!306.Template!307.Template!308.Template!309.Template!310.Template!311.Template!312.Template!313.Template!314.Template!315.Template!316.Template!317.Template!318.Template!319.Template!320.Template!321.Template!322.Template!323.Template!324.Template!325.Template!326.Template!327.Template!328.Template!329.Template!330.Template!331.Template!332.Template!333.Template!334.Template!335.Template!336.Template!337.Template!338.Template!339.Template!340.Template!341.Template!342.Template!343.Template!344.Template!345.Template!346.Template!347.Template!348.Template!349.Template!350.Template!351.Template!352.Template!353.Template!354.Template!355.Template!356.Template!357.Template!358.Template!359.Template!360.Template!361.Template!362.Template!363.Template!364.Template!365.Template!366.Template!367.Template!368.Template!369.Template!370.Template!371.Template!372.Template!373.Template!374.Template!375.Template!376.Template!377.Template!378.Template!379.Template!380.Template!381.Template!382.Template!383.Template!384.Template!385.Template!386.Template!387.Template!388.Template!389.Template!390.Template!391.Template!392.Template!393.Template!394.Template!395.Template!396.Template!397.Template!398.Template!399.Template!400.Template!401.Template!402.Template!403.Template!404.Template!405.Template!406.Template!407.Template!408.Template!409.Template!410.Template!411.Template!412.Template!413.Template!414.Template!415.Template!416.Template!417.Template!418.Template!419.Template!420.Template!421.Template!422.Template!423.Template!424.Template!425.Template!426.Template!427.Template!428.Template!429.Template!430.Template!431.Template!432.Template!433.Template!434.Template!435.Template!436.Template!437.Template!438.Template!439.Template!440.Template!441.Template!442.Template!443.Template!444.Template!445.Template!446.Template!447.Template!448.Template!449.Template!450.Template!451.Template!452.Template!453.Template!454.Template!455.Template!456.Template!457.Template!458.Template!459.Template!460.Template!461.Template!462.Template!463.Template!464.Template!465.Template!466.Template!467.Template!468.Template!469.Template!470.Template!471.Template!472.Template!473.Template!474.Template!475.Template!476.Template!477.Template!478.Template!479.Template!480.Template!481.Template!482.Template!483.Template!484.Template!485.Template!486.Template!487.Template!488.Template!489.Template!490.Template!491.Template!492.Template!493.Template!494.Template!495.Template!496.Template!497.Template!498.Template!499.Template!500` recursive expansion +--- +*/ + +// https://issues.dlang.org/show_bug.cgi?id=2920 +// recursive templates blow compiler stack // template_16 template Template(int i) diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail280.d b/gcc/testsuite/gdc.test/fail_compilation/fail280.d index 796d171f716..95e6c23c435 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail280.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail280.d @@ -1,5 +1,12 @@ -// Issue 2920 - recursive templates blow compiler stack +// https://issues.dlang.org/show_bug.cgi?id=2920 +// recursive templates blow compiler stack // template_17_A. +/* +TEST_OUTPUT: +--- +fail_compilation/fail280.d(13): Error: template instance `fail280.t!500` recursive expansion exceeded allowed nesting limit +--- +*/ template t(int i) { diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail281.d b/gcc/testsuite/gdc.test/fail_compilation/fail281.d index daa9385b69c..3b9bcd70f1b 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail281.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail281.d @@ -1,5 +1,12 @@ -// Issue 2920 - recursive templates blow compiler stack +// https://issues.dlang.org/show_bug.cgi?id=2920 +// recursive templates blow compiler stack // template_29_B. +/* +TEST_OUTPUT: +--- +fail_compilation/fail281.d(15): Error: template instance `fail281.foo!4294966795u` recursive expansion exceeded allowed nesting limit +--- +*/ template foo(uint i) { diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail308.d b/gcc/testsuite/gdc.test/fail_compilation/fail308.d index d283da0e0a9..d885b3ef3ee 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail308.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail308.d @@ -1,4 +1,10 @@ // REQUIRED_ARGS: -unittest +/* +TEST_OUTPUT: +--- +fail_compilation/fail308.d(18): Error: template instance `object.RTInfo!(TestType)` recursive expansion +--- +*/ void main() { diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail3150.d b/gcc/testsuite/gdc.test/fail_compilation/fail3150.d index 3382badb193..5ca758c8578 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail3150.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail3150.d @@ -1,4 +1,10 @@ // REQUIRED_ARGS: -de +/* +TEST_OUTPUT: +--- +fail_compilation/fail3150.d(10): Error: cannot cast expression `[1, 2]` of type `int[]` to `ulong` +--- +*/ void main() { ulong u = cast(ulong)[1,2]; diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail316.d b/gcc/testsuite/gdc.test/fail_compilation/fail316.d index 21788d629d3..ab4077cd2ff 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail316.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail316.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail316.d(17): Error: mixin `fail316.foo.BadImpl!(uint, Mix1)` cannot resolve forward reference +--- +*/ template BadImpl(T, alias thename) { void a_bad_idea(T t) diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail324.d b/gcc/testsuite/gdc.test/fail_compilation/fail324.d index 9963c8b3457..931cb8dd820 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail324.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail324.d @@ -1,5 +1,5 @@ /* -test_output: +TEST_OUTPUT: --- fail_compilation/fail324.d(16): Error: template instance doStuff!((i){ return i; }) cannot use local '__lambda1' as parameter to non-global template doStuff(alias fun)() --- diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail3290.d b/gcc/testsuite/gdc.test/fail_compilation/fail3290.d index f398fc95a7d..2b6bbac3f19 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail3290.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail3290.d @@ -1,4 +1,10 @@ -// 3290 +// https://issues.dlang.org/show_bug.cgi?id=3290 +/* +TEST_OUTPUT: +--- +fail_compilation/fail3290.d(12): Error: argument type mismatch, `const(int)` to `ref int` +--- +*/ void main() { diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail344.d b/gcc/testsuite/gdc.test/fail_compilation/fail344.d index 9173740abf2..f395392a8e7 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail344.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail344.d @@ -1,4 +1,16 @@ -// 3737 +// https://issues.dlang.org/show_bug.cgi?id=3737 +/* +TEST_OUTPUT: +--- +fail_compilation/fail344.d(20): Error: undefined identifier `Q` +fail_compilation/fail344.d(20): Error: undefined identifier `Q` +fail_compilation/fail344.d(20): Error: undefined identifier `V` +fail_compilation/fail344.d(23): while evaluating: `static assert(Alike!(SIB!(crayon)))` +fail_compilation/fail344.d(23): Error: template instance `fail344.SIB!(crayon).SIB.Alike!(SIB!(crayon))` error instantiating +fail_compilation/fail344.d(23): while evaluating: `static assert(Alike!(SIB!(crayon)))` +fail_compilation/fail344.d(28): Error: template instance `fail344.SIB!(crayon).SIB.opDispatch!"E"` error instantiating +--- +*/ int crayon; diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail346.d b/gcc/testsuite/gdc.test/fail_compilation/fail346.d index 532f0bfd213..af491bda15d 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail346.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail346.d @@ -1,3 +1,12 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail346.d(15): Error: undefined identifier `P` +fail_compilation/fail346.d(15): Error: variable `fail346.S.T!0.T` cannot use template to add field to aggregate `S` +fail_compilation/fail346.d(20): Error: template instance `fail346.S.T!0` error instantiating +fail_compilation/fail346.d(23): instantiated from here: `V!(S, 0)` +--- +*/ struct S { int x; diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail356a.d b/gcc/testsuite/gdc.test/fail_compilation/fail356a.d index 4981f72a9a6..6375b5cd24e 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail356a.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail356a.d @@ -1,2 +1,9 @@ +/* +EXTRA_FILES: imports/fail356.d +TEST_OUTPUT: +--- +fail_compilation/fail356a.d(9): Error: variable `fail356a.imports` conflicts with import `fail356a.imports` at fail_compilation/fail356a.d(8) +--- +*/ import imports.fail356; int imports; // collides with package name diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail356b.d b/gcc/testsuite/gdc.test/fail_compilation/fail356b.d index 18f60858b4b..21f91b17e43 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail356b.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail356b.d @@ -1,2 +1,9 @@ +/* +EXTRA_FILES: imports/fail356.d +TEST_OUTPUT: +--- +fail_compilation/fail356b.d(9): Error: variable `fail356b.bar` conflicts with alias `fail356b.bar` at fail_compilation/fail356b.d(8) +--- +*/ import imports.fail356 : bar; int bar; // collides with selective import diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail356c.d b/gcc/testsuite/gdc.test/fail_compilation/fail356c.d index ab12c904085..bd10943c718 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail356c.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail356c.d @@ -1,2 +1,9 @@ +/* +EXTRA_FILES: imports/fail356.d +TEST_OUTPUT: +--- +fail_compilation/fail356c.d(9): Error: variable `fail356c.foo` conflicts with import `fail356c.foo` at fail_compilation/fail356c.d(8) +--- +*/ import foo = imports.fail356; int foo; // collides with renamed import diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail3581a.d b/gcc/testsuite/gdc.test/fail_compilation/fail3581a.d index 5c448668167..56e8c0c4c11 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail3581a.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail3581a.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail3581a.d(9): Error: function `fail3581a.B.f` cannot override a non-virtual function +--- +*/ class A { void f() {} } class B : A { static override void f() {}; } diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail3581b.d b/gcc/testsuite/gdc.test/fail_compilation/fail3581b.d index 38be3225dcc..c2f7f13558a 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail3581b.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail3581b.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail3581b.d(9): Error: function `fail3581b.B.f` `private` method is not virtual and cannot override +--- +*/ class A { void f() {} } class B : A { private override void f() {}; } diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail359.d b/gcc/testsuite/gdc.test/fail_compilation/fail359.d index aae36c894d7..c6a23ad7bcc 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail359.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail359.d @@ -1,3 +1,10 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail359.d(8): Error: #line integer ["filespec"]\n expected +fail_compilation/fail359.d(9): Error: no identifier for declarator `_BOOM` +--- +*/ #line 5 _BOOM void main() { } diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail3673a.d b/gcc/testsuite/gdc.test/fail_compilation/fail3673a.d index 92c23f01309..889d940de44 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail3673a.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail3673a.d @@ -1,2 +1,8 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail3673a.d(8): Error: template constraints only allowed for templates +--- +*/ class A {} class B : A if(false) { } diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail3673b.d b/gcc/testsuite/gdc.test/fail_compilation/fail3673b.d index 264b4aed35b..bf745ac8bbd 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail3673b.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail3673b.d @@ -1,2 +1,12 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail3673b.d(12): Error: basic type expected, not `if` +fail_compilation/fail3673b.d(12): Error: template constraints only allowed for templates +fail_compilation/fail3673b.d(12): Error: { } expected following `class` declaration +fail_compilation/fail3673b.d(12): Error: no identifier for declarator `A` +fail_compilation/fail3673b.d(12): Error: declaration expected, not `{` +--- +*/ class A {} class B : if(false) A { } diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail3731.d b/gcc/testsuite/gdc.test/fail_compilation/fail3731.d index 377fd4919d3..c2903bb73c2 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail3731.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail3731.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail3731.d(13): Error: cannot implicitly convert expression `x` of type `immutable(D)` to `fail3731.main.C` +--- +*/ void main() { diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail3753.d b/gcc/testsuite/gdc.test/fail_compilation/fail3753.d index 48559958653..d20d8e9fc77 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail3753.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail3753.d @@ -1,4 +1,5 @@ /* +TEST_OUTPUT: --- Error: cannot mix core.std.stdlib.alloca() and exception handling in _Dmain() --- diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail3895.d b/gcc/testsuite/gdc.test/fail_compilation/fail3895.d index 9921f2a6b36..3879ef5d379 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail3895.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail3895.d @@ -1,9 +1,14 @@ -import std.stdio; +/* +TEST_OUTPUT: +--- +fail_compilation/fail3895.d(12): Error: cannot append type `double[]` to type `float[]` +--- +*/ + void main() { double[] stuff = [1.,2.,3.,4.,5.]; float[] otherStuff; otherStuff ~= stuff; - writeln(otherStuff); } diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4206.d b/gcc/testsuite/gdc.test/fail_compilation/fail4206.d index 409158a400a..b9c1671d781 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail4206.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail4206.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail4206.d(9): Error: initializer must be an expression, not `s` +--- +*/ struct s {} enum var = s; diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4269a.d b/gcc/testsuite/gdc.test/fail_compilation/fail4269a.d index 7794c462cc0..6604f1f7fc7 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail4269a.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail4269a.d @@ -1,3 +1,11 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail4269a.d(12): Error: undefined identifier `B` +fail_compilation/fail4269a.d(12): Error: variable `fail4269a.A.blah` field not allowed in interface +fail_compilation/fail4269a.d(13): Error: undefined identifier `B` +--- +*/ enum bool WWW = is(typeof(A.x)); interface A { diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4269b.d b/gcc/testsuite/gdc.test/fail_compilation/fail4269b.d index 2234cb846a9..253013344fc 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail4269b.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail4269b.d @@ -1,3 +1,10 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail4269b.d(11): Error: undefined identifier `B` +fail_compilation/fail4269b.d(12): Error: undefined identifier `B` +--- +*/ enum bool WWW = is(typeof(A.x)); struct A { diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4269c.d b/gcc/testsuite/gdc.test/fail_compilation/fail4269c.d index b00ec1be963..8bbfaacb8f1 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail4269c.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail4269c.d @@ -1,3 +1,10 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail4269c.d(11): Error: undefined identifier `B` +fail_compilation/fail4269c.d(12): Error: undefined identifier `B` +--- +*/ enum bool WWW = is(typeof(A.x)); class A { diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4269d.d b/gcc/testsuite/gdc.test/fail_compilation/fail4269d.d index b9d2afc7bee..135e1d4fe51 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail4269d.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail4269d.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail4269d.d(9): Error: undefined identifier `Y` +--- +*/ static if(is(typeof(X6.init))) {} alias Y X6; diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4269e.d b/gcc/testsuite/gdc.test/fail_compilation/fail4269e.d index d7b2f23308b..c63bfac4271 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail4269e.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail4269e.d @@ -1,3 +1,10 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail4269e.d(10): Error: semicolon expected, not `X5` +fail_compilation/fail4269e.d(10): Error: no identifier for declarator `X5` +--- +*/ static if(is(typeof(X5.init))) {} typedef Y X5; diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4269f.d b/gcc/testsuite/gdc.test/fail_compilation/fail4269f.d index 4033447426b..7a719c7c3a3 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail4269f.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail4269f.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail4269f.d(9): Error: `alias X16 = X16;` cannot alias itself, use a qualified name to create an overload set +--- +*/ static if(is(typeof(X16))) {} alias X16 X16; diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4269g.d b/gcc/testsuite/gdc.test/fail_compilation/fail4269g.d index 9241e481de4..69d9a9a1cb9 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail4269g.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail4269g.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail4269g.d(10): Error: alias `fail4269g.Xg` cannot alias an expression `d[1]` +--- +*/ int[2] d; static if(is(typeof(Xg.init))) {} diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4375a.d b/gcc/testsuite/gdc.test/fail_compilation/fail4375a.d index 030b4858b7e..5ee2a311b30 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail4375a.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail4375a.d @@ -1,5 +1,11 @@ // REQUIRED_ARGS: -w -// 4375: Dangling else +// https://issues.dlang.org/show_bug.cgi?id=4375: Dangling else +/* +TEST_OUTPUT: +--- +fail_compilation/fail4375a.d(14): Warning: else is dangling, add { } after condition at fail_compilation/fail4375a.d(11) +--- +*/ void main() { if (true) diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4375b.d b/gcc/testsuite/gdc.test/fail_compilation/fail4375b.d index 6ac5b71b0a7..0d16446cdc6 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail4375b.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail4375b.d @@ -1,5 +1,11 @@ // REQUIRED_ARGS: -w -// 4375: Dangling else +// https://issues.dlang.org/show_bug.cgi?id=4375: Dangling else +/* +TEST_OUTPUT: +--- +fail_compilation/fail4375b.d(16): Warning: else is dangling, add { } after condition at fail_compilation/fail4375b.d(12) +--- +*/ void main() { // disallowed diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4375c.d b/gcc/testsuite/gdc.test/fail_compilation/fail4375c.d index 697c99f0fc8..4e578aac95d 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail4375c.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail4375c.d @@ -1,5 +1,11 @@ // REQUIRED_ARGS: -w -// 4375: Dangling else +// https://issues.dlang.org/show_bug.cgi?id=4375: Dangling else +/* +TEST_OUTPUT: +--- +fail_compilation/fail4375c.d(15): Warning: else is dangling, add { } after condition at fail_compilation/fail4375c.d(11) +--- +*/ void main() { if (true) diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4375d.d b/gcc/testsuite/gdc.test/fail_compilation/fail4375d.d index 329907eec40..8e9b4e776a9 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail4375d.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail4375d.d @@ -1,5 +1,11 @@ // REQUIRED_ARGS: -w -// 4375: Dangling else +// https://issues.dlang.org/show_bug.cgi?id=4375: Dangling else +/* +TEST_OUTPUT: +--- +fail_compilation/fail4375d.d(15): Warning: else is dangling, add { } after condition at fail_compilation/fail4375d.d(11) +--- +*/ void main() { if (true) diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4375e.d b/gcc/testsuite/gdc.test/fail_compilation/fail4375e.d index 14b96d72a7f..ae809bc9367 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail4375e.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail4375e.d @@ -1,5 +1,11 @@ // REQUIRED_ARGS: -w -// 4375: Dangling else +// https://issues.dlang.org/show_bug.cgi?id=4375: Dangling else +/* +TEST_OUTPUT: +--- +fail_compilation/fail4375e.d(14): Warning: else is dangling, add { } after condition at fail_compilation/fail4375e.d(11) +--- +*/ void main() { version (A) diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4375f.d b/gcc/testsuite/gdc.test/fail_compilation/fail4375f.d index c715ee6c7fc..5855b1b0eec 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail4375f.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail4375f.d @@ -1,5 +1,11 @@ // REQUIRED_ARGS: -w -// 4375: Dangling else +// https://issues.dlang.org/show_bug.cgi?id=4375: Dangling else +/* +TEST_OUTPUT: +--- +fail_compilation/fail4375f.d(14): Warning: else is dangling, add { } after condition at fail_compilation/fail4375f.d(11) +--- +*/ void main() { version (A) diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4375g.d b/gcc/testsuite/gdc.test/fail_compilation/fail4375g.d index f555651c4c8..4b9d12b9b46 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail4375g.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail4375g.d @@ -1,5 +1,11 @@ // REQUIRED_ARGS: -w -// 4375: Dangling else +// https://issues.dlang.org/show_bug.cgi?id=4375: Dangling else +/* +TEST_OUTPUT: +--- +fail_compilation/fail4375g.d(14): Warning: else is dangling, add { } after condition at fail_compilation/fail4375g.d(11) +--- +*/ void main() { static if (true) diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4375h.d b/gcc/testsuite/gdc.test/fail_compilation/fail4375h.d index 793e42ba93b..72e3e14bef9 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail4375h.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail4375h.d @@ -1,5 +1,11 @@ // REQUIRED_ARGS: -w -// 4375: Dangling else +// https://issues.dlang.org/show_bug.cgi?id=4375: Dangling else +/* +TEST_OUTPUT: +--- +fail_compilation/fail4375h.d(16): Warning: else is dangling, add { } after condition at fail_compilation/fail4375h.d(13) +--- +*/ void main() { switch (4) { diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4375i.d b/gcc/testsuite/gdc.test/fail_compilation/fail4375i.d index da3e67c93d1..5801c61dcbc 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail4375i.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail4375i.d @@ -1,5 +1,11 @@ // REQUIRED_ARGS: -w -// 4375: Dangling else +// https://issues.dlang.org/show_bug.cgi?id=4375: Dangling else +/* +TEST_OUTPUT: +--- +fail_compilation/fail4375i.d(16): Warning: else is dangling, add { } after condition at fail_compilation/fail4375i.d(11) +--- +*/ void main() { if (true) diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4375j.d b/gcc/testsuite/gdc.test/fail_compilation/fail4375j.d index cd289a08fe3..9a87540cdcb 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail4375j.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail4375j.d @@ -1,5 +1,11 @@ // REQUIRED_ARGS: -w -// 4375: Dangling else +// https://issues.dlang.org/show_bug.cgi?id=4375: Dangling else +/* +TEST_OUTPUT: +--- +fail_compilation/fail4375j.d(16): Warning: else is dangling, add { } after condition at fail_compilation/fail4375j.d(11) +--- +*/ void main() { if (true) diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4375k.d b/gcc/testsuite/gdc.test/fail_compilation/fail4375k.d index f372406d4a8..bb8b7b2d6df 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail4375k.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail4375k.d @@ -1,5 +1,11 @@ // REQUIRED_ARGS: -w -// 4375: Dangling else +// https://issues.dlang.org/show_bug.cgi?id=4375: Dangling else +/* +TEST_OUTPUT: +--- +fail_compilation/fail4375k.d-mixin-11(15): Warning: else is dangling, add { } after condition at fail_compilation/fail4375k.d-mixin-11(12) +--- +*/ void main() { mixin(q{ diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4375l.d b/gcc/testsuite/gdc.test/fail_compilation/fail4375l.d index fea1d82d0ef..965b0e72cbe 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail4375l.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail4375l.d @@ -1,5 +1,11 @@ // REQUIRED_ARGS: -w -// 4375: Dangling else +// https://issues.dlang.org/show_bug.cgi?id=4375: Dangling else +/* +TEST_OUTPUT: +--- +fail_compilation/fail4375l.d(15): Warning: else is dangling, add { } after condition at fail_compilation/fail4375l.d(11) +--- +*/ void main() { if (true) diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4375m.d b/gcc/testsuite/gdc.test/fail_compilation/fail4375m.d index fdde1a11b3d..a6bdf1e80db 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail4375m.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail4375m.d @@ -1,5 +1,11 @@ // REQUIRED_ARGS: -w -// 4375: Dangling else +// https://issues.dlang.org/show_bug.cgi?id=4375: Dangling else +/* +TEST_OUTPUT: +--- +fail_compilation/fail4375m.d(15): Warning: else is dangling, add { } after condition at fail_compilation/fail4375m.d(12) +--- +*/ void main() { do diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4375o.d b/gcc/testsuite/gdc.test/fail_compilation/fail4375o.d index 6c3d3e15e4e..c37b2196308 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail4375o.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail4375o.d @@ -1,5 +1,11 @@ // REQUIRED_ARGS: -w -// 4375: Dangling else +// https://issues.dlang.org/show_bug.cgi?id=4375: Dangling else +/* +TEST_OUTPUT: +--- +fail_compilation/fail4375o.d(15): Warning: else is dangling, add { } after condition at fail_compilation/fail4375o.d(11) +--- +*/ void main() { if (true) diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4375p.d b/gcc/testsuite/gdc.test/fail_compilation/fail4375p.d index 82f7cabd28b..52a6e65609c 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail4375p.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail4375p.d @@ -1,5 +1,12 @@ // REQUIRED_ARGS: -w -// 4375: Dangling else +// https://issues.dlang.org/show_bug.cgi?id=4375: Dangling else +/* +TEST_OUTPUT: +--- +fail_compilation/fail4375p.d(19): Warning: else is dangling, add { } after condition at fail_compilation/fail4375p.d(12) +fail_compilation/fail4375p.d(16): Error: undefined identifier `x` +--- +*/ void main() { if (true) diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4375q.d b/gcc/testsuite/gdc.test/fail_compilation/fail4375q.d index 7d11c46f347..f445eaba7cf 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail4375q.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail4375q.d @@ -1,5 +1,12 @@ // REQUIRED_ARGS: -w -// 4375: Dangling else +// https://issues.dlang.org/show_bug.cgi?id=4375: Dangling else +/* +TEST_OUTPUT: +--- +fail_compilation/fail4375q.d(17): Warning: else is dangling, add { } after condition at fail_compilation/fail4375q.d(13) +fail_compilation/fail4375q.d(14): Error: `with` expressions must be aggregate types or pointers to them, not `int` +--- +*/ void main() { auto x = 1; diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4375r.d b/gcc/testsuite/gdc.test/fail_compilation/fail4375r.d index 49b2f8a8a3c..61923e207d7 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail4375r.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail4375r.d @@ -1,5 +1,11 @@ // REQUIRED_ARGS: -w -// 4375: Dangling else +// https://issues.dlang.org/show_bug.cgi?id=4375: Dangling else +/* +TEST_OUTPUT: +--- +fail_compilation/fail4375r.d(17): Warning: else is dangling, add { } after condition at fail_compilation/fail4375r.d(11) +--- +*/ void main() { if (true) diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4375s.d b/gcc/testsuite/gdc.test/fail_compilation/fail4375s.d index ed1b7256906..cd4e5a07e47 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail4375s.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail4375s.d @@ -1,5 +1,11 @@ // REQUIRED_ARGS: -w -// 4375: Dangling else +// https://issues.dlang.org/show_bug.cgi?id=4375: Dangling else +/* +TEST_OUTPUT: +--- +fail_compilation/fail4375s.d(17): Warning: else is dangling, add { } after condition at fail_compilation/fail4375s.d(11) +--- +*/ void main() { if (true) diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4375t.d b/gcc/testsuite/gdc.test/fail_compilation/fail4375t.d index 197563654f3..557761b7100 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail4375t.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail4375t.d @@ -1,5 +1,11 @@ // REQUIRED_ARGS: -w -unittest -// 4375: Dangling else +// https://issues.dlang.org/show_bug.cgi?id=4375: Dangling else +/* +TEST_OUTPUT: +--- +fail_compilation/fail4375t.d(14): Warning: else is dangling, add { } after condition at fail_compilation/fail4375t.d(11) +--- +*/ unittest { // disallowed if (true) diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4375u.d b/gcc/testsuite/gdc.test/fail_compilation/fail4375u.d index cb06823a028..1028b787c20 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail4375u.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail4375u.d @@ -1,5 +1,11 @@ // REQUIRED_ARGS: -w -// 4375: Dangling else +// https://issues.dlang.org/show_bug.cgi?id=4375: Dangling else +/* +TEST_OUTPUT: +--- +fail_compilation/fail4375u.d(13): Warning: else is dangling, add { } after condition at fail_compilation/fail4375u.d(11) +--- +*/ static if (true) static if (false) diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4375v.d b/gcc/testsuite/gdc.test/fail_compilation/fail4375v.d index 1510c8dc935..f4a6089c0db 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail4375v.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail4375v.d @@ -1,5 +1,11 @@ // REQUIRED_ARGS: -w -// 4375: Dangling else +// https://issues.dlang.org/show_bug.cgi?id=4375: Dangling else +/* +TEST_OUTPUT: +--- +fail_compilation/fail4375v.d(13): Warning: else is dangling, add { } after condition at fail_compilation/fail4375v.d(11) +--- +*/ version (A) version (B) diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4375w.d b/gcc/testsuite/gdc.test/fail_compilation/fail4375w.d index cd3c3bdf245..ae1ac21839c 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail4375w.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail4375w.d @@ -1,5 +1,11 @@ // REQUIRED_ARGS: -w -// 4375: Dangling else +// https://issues.dlang.org/show_bug.cgi?id=4375: Dangling else +/* +TEST_OUTPUT: +--- +fail_compilation/fail4375w.d(13): Warning: else is dangling, add { } after condition at fail_compilation/fail4375w.d(11) +--- +*/ static if (true) version (B) diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4375x.d b/gcc/testsuite/gdc.test/fail_compilation/fail4375x.d index b6ae64fd187..33c8eb2a899 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail4375x.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail4375x.d @@ -1,5 +1,11 @@ // REQUIRED_ARGS: -w -// 4375: Dangling else +// https://issues.dlang.org/show_bug.cgi?id=4375: Dangling else +/* +TEST_OUTPUT: +--- +fail_compilation/fail4375x.d(14): Warning: else is dangling, add { } after condition at fail_compilation/fail4375x.d(11) +--- +*/ static if (true) abstract: diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4375y.d b/gcc/testsuite/gdc.test/fail_compilation/fail4375y.d index b3713e38f12..bc796312b1c 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail4375y.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail4375y.d @@ -1,5 +1,11 @@ // REQUIRED_ARGS: -w -// 4375: Dangling else +// https://issues.dlang.org/show_bug.cgi?id=4375: Dangling else +/* +TEST_OUTPUT: +--- +fail_compilation/fail4375y.d(16): Warning: else is dangling, add { } after condition at fail_compilation/fail4375y.d(11) +--- +*/ static if (true) align(1) diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4510.d b/gcc/testsuite/gdc.test/fail_compilation/fail4510.d index d10100070e1..64a8d45afd1 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail4510.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail4510.d @@ -1,4 +1,10 @@ -// 4510 +// https://issues.dlang.org/show_bug.cgi?id=4510 +/* +TEST_OUTPUT: +--- +fail_compilation/fail4510.d(12): Error: argument type mismatch, `float` to `ref double` +--- +*/ void main() { diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4511.d b/gcc/testsuite/gdc.test/fail_compilation/fail4511.d index f4d8a1c73e1..efe4d41aedd 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail4511.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail4511.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail4511.d(18): Error: cannot implicitly override base class method `fail4511.test72.X.func` with `fail4511.test72.Y.func`; add `override` attribute +--- +*/ void test72() { class A {} diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4517.d b/gcc/testsuite/gdc.test/fail_compilation/fail4517.d index a55b0f5f927..f3fe031a147 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail4517.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail4517.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail4517.d(16): Error: `enum` member `B` not represented in `final switch` +--- +*/ enum E : ushort { diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4611.d b/gcc/testsuite/gdc.test/fail_compilation/fail4611.d index f1547ba12c5..02fcc2ebb6f 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail4611.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail4611.d @@ -1,4 +1,5 @@ /* +TEST_OUTPUT: --- fail_compilation/fail4611.d(15): Error: Vec[2147483647] size 4 * 2147483647 exceeds 0x7fffffff size limit for static array --- diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail47.d b/gcc/testsuite/gdc.test/fail_compilation/fail47.d index d320fdafc8b..9da0c0927a2 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail47.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail47.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail47.d(8): Error: variable `fail47._foo` is aliased to a function +--- +*/ void foo() {} int _foo; alias _foo foo; diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4958.d b/gcc/testsuite/gdc.test/fail_compilation/fail4958.d index b72347662e1..02bbc61666b 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail4958.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail4958.d @@ -1,2 +1,8 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail4958.d(8): Error: enum member `fail4958.FloatEnum.B` has inexact value due to loss of precision +--- +*/ enum FloatEnum : float { A = float.max/2, B, C } diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail5435.d b/gcc/testsuite/gdc.test/fail_compilation/fail5435.d index 2c610a86d66..fefed374db5 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail5435.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail5435.d @@ -1,4 +1,32 @@ -// 5435 +// https://issues.dlang.org/show_bug.cgi?id=5435 +/* +TEST_OUTPUT: +--- +Enum5435.A +Enum5435.B +Enum5435.C +fail_compilation/fail5435.d(38): Error: cannot implicitly convert expression `"foo"` of type `string` to `Enum5435` +fail_compilation/fail5435.d(38): while evaluating `pragma(msg, foo)` +fail_compilation/fail5435.d(38): Error: cannot implicitly convert expression `3.0` of type `double` to `Enum5435` +fail_compilation/fail5435.d(38): while evaluating `pragma(msg, foo)` +fail_compilation/fail5435.d(39): Error: cannot implicitly convert expression `Enum5435.A` of type `Enum5435` to `string` +fail_compilation/fail5435.d(39): while evaluating `pragma(msg, foo)` +fail_compilation/fail5435.d(39): Error: cannot implicitly convert expression `Enum5435.B` of type `Enum5435` to `string` +fail_compilation/fail5435.d(39): while evaluating `pragma(msg, foo)` +fail_compilation/fail5435.d(39): Error: cannot implicitly convert expression `Enum5435.C` of type `Enum5435` to `string` +fail_compilation/fail5435.d(39): while evaluating `pragma(msg, foo)` +foo +fail_compilation/fail5435.d(39): Error: cannot implicitly convert expression `3.0` of type `double` to `string` +fail_compilation/fail5435.d(39): while evaluating `pragma(msg, foo)` +0 +1 +2 +fail_compilation/fail5435.d(40): Error: cannot implicitly convert expression `"foo"` of type `string` to `int` +fail_compilation/fail5435.d(40): while evaluating `pragma(msg, foo)` +fail_compilation/fail5435.d(40): Error: cannot implicitly convert expression `3.0` of type `double` to `int` +fail_compilation/fail5435.d(40): while evaluating `pragma(msg, foo)` +--- +*/ template Tuple5435(E...) { alias E Tuple5435; } enum Enum5435 { A, B, C }; diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail56.d b/gcc/testsuite/gdc.test/fail_compilation/fail56.d index 579401fb703..64902fedec3 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail56.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail56.d @@ -1,3 +1,10 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail56.d(21): Error: mixin `dstress.nocompile.bug_20050330_A.main.Blah!(5, a).Blah!(5, a)` recursive mixin instantiation +fail_compilation/fail56.d(26): Error: mixin `dstress.nocompile.bug_20050330_A.main.Blah!(5, a)` error instantiating +--- +*/ // $HeadURL$ // $Date$ // $Author$ diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail5634.d b/gcc/testsuite/gdc.test/fail_compilation/fail5634.d index 0044adf8df2..e2442e65593 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail5634.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail5634.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +---- +fail_compilation/fail5634.d(9): Error: function `D main()` conflicts with previous declaration at fail_compilation/fail5634.d(8) +--- +*/ + void main() { } void main() { } - diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail57.d b/gcc/testsuite/gdc.test/fail_compilation/fail57.d index ded3a6ea582..41149cdc2f5 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail57.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail57.d @@ -1,3 +1,10 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail57.d(11): Error: divide by 0 +fail_compilation/fail57.d(11): Error: divide by 0 +--- +*/ int main() { diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail5733.d b/gcc/testsuite/gdc.test/fail_compilation/fail5733.d index 2292716bc9c..d58b362315b 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail5733.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail5733.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail5733.d(12): Error: `opDispatch!"foo"` isn't a template +--- +*/ struct Test { struct opDispatch(string dummy) diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail58.d b/gcc/testsuite/gdc.test/fail_compilation/fail58.d index ad6f8da3e30..29d9e5847f8 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail58.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail58.d @@ -1,3 +1,12 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail58.d(26): Error: function `fail58.SomeFunc(dchar[] pText, out int pStopPosn)` is not callable using argument types `(string, int)` +fail_compilation/fail58.d(26): cannot pass argument `"123"` of type `string` to parameter `dchar[] pText` +fail_compilation/fail58.d(30): Error: function `fail58.SomeFunc(dchar[] pText, out int pStopPosn)` is not callable using argument types `(string, int)` +fail_compilation/fail58.d(30): cannot pass argument `""` of type `string` to parameter `dchar[] pText` +--- +*/ debug(1) import std.stdio; const int anything = -1000; // Line #2 dchar[] SomeFunc( dchar[] pText, out int pStopPosn) diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail5851.d b/gcc/testsuite/gdc.test/fail_compilation/fail5851.d index c422c1436d1..236a956de92 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail5851.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail5851.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail5851.d(11): Error: alias this is not reachable as `Foo` already converts to `object.Object` +--- +*/ class Foo { diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail5953a1.d b/gcc/testsuite/gdc.test/fail_compilation/fail5953a1.d index f977c5822bb..cd64e74b85f 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail5953a1.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail5953a1.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail5953a1.d(9): Error: expression expected, not `,` +--- +*/ void main() { auto a2 = [,]; // invalid, but compiles diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail5953a2.d b/gcc/testsuite/gdc.test/fail_compilation/fail5953a2.d index a1e6c75cb3a..2edbc102987 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail5953a2.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail5953a2.d @@ -1,3 +1,11 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail5953a2.d(11): Error: expression expected, not `,` +fail_compilation/fail5953a2.d(11): Error: expression expected, not `,` +fail_compilation/fail5953a2.d(11): Error: expression expected, not `,` +--- +*/ void main() { auto a3 = [,,,]; // invalid, but compiles diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail5953s1.d b/gcc/testsuite/gdc.test/fail_compilation/fail5953s1.d index c64601b003c..275c3f95798 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail5953s1.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail5953s1.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail5953s1.d(10): Error: expression expected, not `,` +--- +*/ void main() { struct S{} diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail5953s2.d b/gcc/testsuite/gdc.test/fail_compilation/fail5953s2.d index 3f1ac9c42d4..d66ff5d20d3 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail5953s2.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail5953s2.d @@ -1,3 +1,11 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail5953s2.d(12): Error: expression expected, not `,` +fail_compilation/fail5953s2.d(12): Error: expression expected, not `,` +fail_compilation/fail5953s2.d(12): Error: expression expected, not `,` +--- +*/ void main() { struct S{} diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail60.d b/gcc/testsuite/gdc.test/fail_compilation/fail60.d index 3d660252be8..ec8de0b223c 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail60.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail60.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail60.d(14): Error: `this` is only defined in non-static member functions, not `A` +--- +*/ class A { class B diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail6029.d b/gcc/testsuite/gdc.test/fail_compilation/fail6029.d index e5199db6628..45797ebccc9 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail6029.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail6029.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail6029.d(10): Error: alias this is not reachable as `A` already converts to `A` +--- +*/ struct A { static A a; diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail6242.d b/gcc/testsuite/gdc.test/fail_compilation/fail6242.d index 92df7700563..08f5de3e299 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail6242.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail6242.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail6242.d(9): Error: cannot implicitly override base class method `fail6242.A.fun` with `fail6242.B.fun`; add `override` attribute +--- +*/ class A { void fun(int) {} } class B : A { void fun(int x) in { assert(x > 0); } body {} } diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail6458.d b/gcc/testsuite/gdc.test/fail_compilation/fail6458.d index 52b97a3b0d0..218de0d861e 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail6458.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail6458.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail6458.d(10): Error: Invalid trailing code unit +--- +*/ void main() { diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail6497.d b/gcc/testsuite/gdc.test/fail_compilation/fail6497.d index d985cb45553..3ac90b5c0c0 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail6497.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail6497.d @@ -1,3 +1,10 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail6497.d(12): Error: cannot take address of local `n` in `@safe` function `main` +fail_compilation/fail6497.d(12): Error: cannot take address of local `n` in `@safe` function `main` +--- +*/ void main() @safe { diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail6561.d b/gcc/testsuite/gdc.test/fail_compilation/fail6561.d index 8a9da8ba2e8..456ef0de7f5 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail6561.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail6561.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail6561.d(9): Error: undefined identifier `x` +--- +*/ struct S { alias x this; // should cause undefined identifier error diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail6611.d b/gcc/testsuite/gdc.test/fail_compilation/fail6611.d index 781688978d1..26587dc7e5a 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail6611.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail6611.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail6611.d(11): Error: cannot post-increment array slice `x[]`, use pre-increment instead +--- +*/ void main() { diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail6781.d b/gcc/testsuite/gdc.test/fail_compilation/fail6781.d index ef1c77f073a..174ca3d2481 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail6781.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail6781.d @@ -1,3 +1,10 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail6781.d(9): Error: undefined identifier `some_error` +fail_compilation/fail6781.d(14): Error: template instance `fail6781.C6781.makeSortedIndices.bug6781!(greater)` error instantiating +--- +*/ void bug6781(alias xxx)() { some_error; } diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail6968.d b/gcc/testsuite/gdc.test/fail_compilation/fail6968.d index 69f63b9cbce..b56a5db931e 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail6968.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail6968.d @@ -1,4 +1,14 @@ -// 6968 +// https://issues.dlang.org/show_bug.cgi?id=6968 +/* +TEST_OUTPUT: +--- +fail_compilation/fail6968.d(26): Error: cannot pass type `int` as a function argument +fail_compilation/fail6968.d(26): Error: cannot pass type `long` as a function argument +fail_compilation/fail6968.d(26): Error: circular initialization of variable `fail6968.PredAny!(int, long, float).PredAny` +fail_compilation/fail6968.d(31): Error: template instance `fail6968.PredAny!(int, long, float)` error instantiating +fail_compilation/fail6968.d(31): while evaluating `pragma(msg, PredAny!(int, long, float))` +--- +*/ template Pred(A, B) { diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail7173.d b/gcc/testsuite/gdc.test/fail_compilation/fail7173.d index 2f6c748f7c0..05ba7f9fc0a 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail7173.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail7173.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail7173.d(23): Error: expression `b1._a.opBinary(b2._a).fun()` is `void` and has no value +--- +*/ struct A{ A opBinary(string op)(A a){ A rt; return rt; } diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail7178.d b/gcc/testsuite/gdc.test/fail_compilation/fail7178.d index 04a1018d8c5..85402493ed4 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail7178.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail7178.d @@ -1,3 +1,10 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail7178.d(10): Error: undefined identifier `contents` in module `fail7178` +fail_compilation/fail7178.d(12): Error: mixin `fail7178.populate!int` error instantiating +--- +*/ template populate(overloads...) { mixin populate!(.contents); diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail7234.d b/gcc/testsuite/gdc.test/fail_compilation/fail7234.d index e8ddd4e438c..f38308d7f18 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail7234.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail7234.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail7234.d(14): Error: no property `empty` for type `Contract*`, perhaps `import std.range;` is needed? +--- +*/ struct Contract { void opDispatch()(){} diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail7369.d b/gcc/testsuite/gdc.test/fail_compilation/fail7369.d index b54757d96e3..f17dc96277a 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail7369.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail7369.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail7369.d(9): Error: cannot modify `this.a` in `const` function +--- +*/ struct S7369 { int a; invariant() { a += 5; } diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail7424b.d b/gcc/testsuite/gdc.test/fail_compilation/fail7424b.d index d358b60c7db..1a7e092fb5b 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail7424b.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail7424b.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail7424b.d(10): Error: cannot resolve type for this.g()() +--- +*/ struct S7424b { @property int g()() { return 0; } diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail7424c.d b/gcc/testsuite/gdc.test/fail_compilation/fail7424c.d index c0671786ce5..1c0654091f7 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail7424c.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail7424c.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail7424c.d(10): Error: cannot resolve type for this.g()() +--- +*/ struct S7424c { @property int g()() { return 0; } diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail7424d.d b/gcc/testsuite/gdc.test/fail_compilation/fail7424d.d index a981be6a39c..d784a7580c4 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail7424d.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail7424d.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail7424d.d(10): Error: cannot resolve type for this.g()() +--- +*/ struct S7424d { @property int g()() immutable { return 0; } diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail7424e.d b/gcc/testsuite/gdc.test/fail_compilation/fail7424e.d index 4dfda623e3b..3bf3a2d97db 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail7424e.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail7424e.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail7424e.d(10): Error: cannot resolve type for this.g()() +--- +*/ struct S7424e { @property int g()() immutable { return 0; } diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail7424f.d b/gcc/testsuite/gdc.test/fail_compilation/fail7424f.d index e72a05b5649..266163de75d 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail7424f.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail7424f.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail7424f.d(10): Error: cannot resolve type for this.g()() +--- +*/ struct S7424f { @property int g()() shared { return 0; } diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail7424g.d b/gcc/testsuite/gdc.test/fail_compilation/fail7424g.d index 059f586a480..aca6586c8f8 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail7424g.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail7424g.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail7424g.d(10): Error: cannot resolve type for this.g()() +--- +*/ struct S7424g { @property int g()() { return 0; } diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail7424h.d b/gcc/testsuite/gdc.test/fail_compilation/fail7424h.d index fd22b2efde0..e08eac13de2 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail7424h.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail7424h.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail7424h.d(10): Error: cannot resolve type for this.g()() +--- +*/ struct S7424g { @property int g()() { return 0; } diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail7424i.d b/gcc/testsuite/gdc.test/fail_compilation/fail7424i.d index 2871e932140..1c2cb1cd687 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail7424i.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail7424i.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail7424i.d(10): Error: cannot resolve type for this.g()() +--- +*/ struct S7424g { @property int g()() immutable { return 0; } diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail7524a.d b/gcc/testsuite/gdc.test/fail_compilation/fail7524a.d index 6f1ebefb27f..834c3157028 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail7524a.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail7524a.d @@ -1,4 +1,10 @@ - -// 7524 +/* +REQUIRED_ARGS: -o- +TEST_OUTPUT: +---- +fail_compilation/fail7524a.d(10): Error: #line integer ["filespec"]\n expected +fail_compilation/fail7524a.d(10): Error: declaration expected, not `"$r:\w+ +\d+ \d+$"` +---- +*/ #line 47 __DATE__ diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail7524b.d b/gcc/testsuite/gdc.test/fail_compilation/fail7524b.d index 042baf5d1d6..f462746ece6 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail7524b.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail7524b.d @@ -1,3 +1,10 @@ -// 7524 +// https://issues.dlang.org/show_bug.cgi?id=7524 +/* +TEST_OUTPUT: +--- +fail_compilation/fail7524b.d(10): Error: #line integer ["filespec"]\n expected +fail_compilation/fail7524b.d(10): Error: declaration expected, not `$n$L` +--- +*/ #line 47 __VERSION__ diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail7603a.d b/gcc/testsuite/gdc.test/fail_compilation/fail7603a.d index e1d28eaf742..76a92c2b193 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail7603a.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail7603a.d @@ -1 +1,7 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail7603a.d(7): Error: cannot modify constant `true` +--- +*/ void test(ref bool val = true) { } diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail7603b.d b/gcc/testsuite/gdc.test/fail_compilation/fail7603b.d index 5317072296e..9b84d3f6a4d 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail7603b.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail7603b.d @@ -1 +1,7 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail7603b.d(7): Error: cannot modify constant `true` +--- +*/ void test(out bool val = true) { } diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail7603c.d b/gcc/testsuite/gdc.test/fail_compilation/fail7603c.d index f5f6e18caf2..25a7399dd7a 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail7603c.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail7603c.d @@ -1,2 +1,8 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail7603c.d(8): Error: cannot modify constant `3` +--- +*/ enum x = 3; void test(ref int val = x) { } diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail77.d b/gcc/testsuite/gdc.test/fail_compilation/fail77.d index 79ada7063ea..687b0ad1293 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail77.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail77.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail77.d(11): Error: cannot cast expression `& i` of type `int*` to `ubyte[4]` +--- +*/ void test() { int i; diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail7702.d b/gcc/testsuite/gdc.test/fail_compilation/fail7702.d index 8b7ae21cb89..4638c0bcfa4 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail7702.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail7702.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail7702.d(14): Error: `s.opDispatch!"x"` isn't a template +--- +*/ struct S { template opDispatch (string name) {} diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail7751.d b/gcc/testsuite/gdc.test/fail_compilation/fail7751.d index e367d0e3b37..87143fa7d24 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail7751.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail7751.d @@ -1,3 +1,10 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail7751.d(15): Error: no constructor for `Foo` +fail_compilation/fail7751.d(23): Error: template instance `fail7751.foo!int` error instantiating +--- +*/ class Foo(T) { T x; diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail7851.d b/gcc/testsuite/gdc.test/fail_compilation/fail7851.d index 7ede41f3728..f5d9ea385b6 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail7851.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail7851.d @@ -1,4 +1,12 @@ -// 7851 +// https://issues.dlang.org/show_bug.cgi?id=7851 +/* +TEST_OUTPUT: +--- +fail_compilation/fail7851.d(38): Error: need `this` for `__mem_field_0` of type `int` +fail_compilation/fail7851.d(38): Error: need `this` for `__mem_field_1` of type `long` +fail_compilation/fail7851.d(38): Error: need `this` for `__mem_field_2` of type `float` +--- +*/ template TypeTuple(TList...) diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail7859.d b/gcc/testsuite/gdc.test/fail_compilation/fail7859.d index 436d3a363b4..ef8b770dd5a 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail7859.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail7859.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail7859.d(9): Error: undefined identifier `NonExistent` +--- +*/ template A(alias B) {} mixin template C(alias B = cast(NonExistent)null) { diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail7861.d b/gcc/testsuite/gdc.test/fail_compilation/fail7861.d index ce59e8edee2..e3a2d0817ce 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail7861.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail7861.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail7861.d(17): Error: no property `nonexistent` for type `test.B` +--- +*/ module test; mixin template A() { diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail8009.d b/gcc/testsuite/gdc.test/fail_compilation/fail8009.d index 1af7e2c279b..19a0712f838 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail8009.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail8009.d @@ -1,3 +1,10 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail8009.d(9): Error: template `fail8009.filter` cannot deduce function from argument types `!()(void)`, candidates are: +fail_compilation/fail8009.d(8): `filter(R)(scope bool delegate(ref BAD!R) func)` +--- +*/ void filter(R)(scope bool delegate(ref BAD!R) func) { } void main() { filter(r => r); } diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail8032.d b/gcc/testsuite/gdc.test/fail_compilation/fail8032.d index a328181c20a..9f6dc40669f 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail8032.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail8032.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail8032.d(19): Error: function `fail8032.B.f` cannot determine overridden function +--- +*/ mixin template T() { void f() { } diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail8313.d b/gcc/testsuite/gdc.test/fail_compilation/fail8313.d index 9dec1bdb289..2badeff454b 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail8313.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail8313.d @@ -1,3 +1,13 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail8313.d(13): Error: `fail8313.bar` called with argument types `(int)` matches both: +fail_compilation/fail8313.d(11): `fail8313.bar!().bar(int x)` +and: +fail_compilation/fail8313.d(12): `fail8313.bar!().bar(int x)` +fail_compilation/fail8313.d(13): while evaluating: `static assert(bar()(int x)(1))` +--- +*/ auto bar()(int x){return x;} auto bar()(int x = bar()){return x;} static assert(bar(1)); diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail8691.d b/gcc/testsuite/gdc.test/fail_compilation/fail8691.d index e1979bb2ce8..8e46023d3bd 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail8691.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail8691.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail8691.d(7): Error: struct `fail8691.Foo` cannot have field `f` with static array of same struct type +--- +*/ struct Foo { Foo[1] f; diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail9301.d b/gcc/testsuite/gdc.test/fail_compilation/fail9301.d index bd7e95283f4..eee72703695 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail9301.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail9301.d @@ -1,6 +1,9 @@ /* -REQUIRED_ARGS: -o- -PERMUTE_ARGS: +REQUIRED_ARGS: -m64 -o- +TEST_OUTPUT: +--- +fail_compilation/fail9301.d(11): Error: cannot implicitly convert expression `0` of type `int` to `__vector(void[16])` +--- */ void main() diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail94.d b/gcc/testsuite/gdc.test/fail_compilation/fail94.d index 23fef9357cb..335b6952270 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail94.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail94.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail94.d(28): Error: cannot implicitly override base class method `fail94.A.clone` with `fail94.B.clone`; add `override` attribute +--- +*/ interface I { int foo(); diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail9613.d b/gcc/testsuite/gdc.test/fail_compilation/fail9613.d index 18a18cc3d85..7f9d007af45 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail9613.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail9613.d @@ -1,4 +1,11 @@ // PREMUTE_ARGS: +/* +TEST_OUTPUT: +--- +fail_compilation/fail9613.d(12): Error: `(arguments)` expected following `const(byte)` +fail_compilation/fail9613.d(12): Error: semicolon expected following auto declaration, not `.` +--- +*/ void main() { diff --git a/gcc/testsuite/gdc.test/fail_compilation/failinout1.d b/gcc/testsuite/gdc.test/fail_compilation/failinout1.d index fc3d7913246..aa7a4b66f54 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/failinout1.d +++ b/gcc/testsuite/gdc.test/fail_compilation/failinout1.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/failinout1.d(9): Error: cannot modify `inout` expression `x` +--- +*/ inout(int) foo(inout(int) x) { x = 5; // cannot modify inout diff --git a/gcc/testsuite/gdc.test/fail_compilation/failinout2.d b/gcc/testsuite/gdc.test/fail_compilation/failinout2.d index 12a9c44f84a..e1553636ab7 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/failinout2.d +++ b/gcc/testsuite/gdc.test/fail_compilation/failinout2.d @@ -1 +1,7 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/failinout2.d(7): Error: variable `failinout2.x` only parameters or stack based variables can be `inout` +--- +*/ inout int x; diff --git a/gcc/testsuite/gdc.test/fail_compilation/failinout3748a.d b/gcc/testsuite/gdc.test/fail_compilation/failinout3748a.d index bb2cd55aaf5..77edb7e523d 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/failinout3748a.d +++ b/gcc/testsuite/gdc.test/fail_compilation/failinout3748a.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/failinout3748a.d(9): Error: variable `failinout3748a.S3748.err8` only parameters or stack based variables can be `inout` +--- +*/ struct S3748 { inout(int) err8; diff --git a/gcc/testsuite/gdc.test/fail_compilation/failinout3748b.d b/gcc/testsuite/gdc.test/fail_compilation/failinout3748b.d index 741e44fa0a5..b6dddd879ca 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/failinout3748b.d +++ b/gcc/testsuite/gdc.test/fail_compilation/failinout3748b.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/failinout3748b.d(9): Error: variable `failinout3748b.main.err11` `inout` variables can only be declared inside `inout` functions +--- +*/ void main() { inout(int)* err11; diff --git a/gcc/testsuite/gdc.test/fail_compilation/failsafea.d b/gcc/testsuite/gdc.test/fail_compilation/failsafea.d index b2a3f227b0d..e121bda1b96 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/failsafea.d +++ b/gcc/testsuite/gdc.test/fail_compilation/failsafea.d @@ -1,3 +1,10 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/failsafea.d(14): Error: `@safe` function `failsafea.callingsystem` cannot call `@system` function `failsafea.systemfunc` +fail_compilation/failsafea.d(9): `failsafea.systemfunc` is declared here +--- +*/ void systemfunc() @system {} diff --git a/gcc/testsuite/gdc.test/fail_compilation/failsafeb.d b/gcc/testsuite/gdc.test/fail_compilation/failsafeb.d index c04d9ee5dc7..6af6b6f98c6 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/failsafeb.d +++ b/gcc/testsuite/gdc.test/fail_compilation/failsafeb.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/failsafeb.d(13): Error: `@safe` function `failsafeb.callingsystem` cannot call `@system` function pointer `sysfuncptr` +--- +*/ void function() @system sysfuncptr; diff --git a/gcc/testsuite/gdc.test/fail_compilation/failsafec.d b/gcc/testsuite/gdc.test/fail_compilation/failsafec.d index 8bcda913720..4446e76fde2 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/failsafec.d +++ b/gcc/testsuite/gdc.test/fail_compilation/failsafec.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/failsafec.d(13): Error: `@safe` function `failsafec.callingsystem` cannot call `@system` delegate `sysdelegate` +--- +*/ void delegate() @system sysdelegate; diff --git a/gcc/testsuite/gdc.test/fail_compilation/fix350a.d b/gcc/testsuite/gdc.test/fail_compilation/fix350a.d index 8c3563c2c03..2d60a009d7d 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fix350a.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fix350a.d @@ -1,3 +1,10 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fix350a.d(12): Error: comma expected separating field initializers +fail_compilation/fix350a.d(12): Error: comma expected separating field initializers +--- +*/ struct S1 { int a, b, c; diff --git a/gcc/testsuite/gdc.test/fail_compilation/fix350b.d b/gcc/testsuite/gdc.test/fail_compilation/fix350b.d index 6c1a0bc949e..8ec428f8854 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fix350b.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fix350b.d @@ -1,3 +1,11 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fix350b.d(15): Error: comma expected separating field initializers +fail_compilation/fix350b.d(15): Error: comma expected separating field initializers +fail_compilation/fix350b.d(16): Error: comma expected separating field initializers +--- +*/ int foo() { return 3; } struct S2 diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice10273.d b/gcc/testsuite/gdc.test/fail_compilation/ice10273.d index b7983bbc482..763fc06a0bb 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/ice10273.d +++ b/gcc/testsuite/gdc.test/fail_compilation/ice10273.d @@ -1,4 +1,14 @@ -// 10273 - ICE in CTFE +// https://issues.dlang.org/show_bug.cgi?id=10273 +// ICE in CTFE +/* +TEST_OUTPUT: +--- +fail_compilation/ice10273.d(14): Error: cannot implicitly convert expression `3.45` of type `double` to `int` +fail_compilation/ice10273.d(13): Error: CTFE failed because of previous errors in `Bug10273.init` +fail_compilation/ice10273.d(22): called from here: `bug10273()` +fail_compilation/ice10273.d(22): while evaluating: `static assert(bug10273())` +--- +*/ struct Bug10273 { int val = 3.45; diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice10283.d b/gcc/testsuite/gdc.test/fail_compilation/ice10283.d index 347ac3557b5..f52b8a27645 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/ice10283.d +++ b/gcc/testsuite/gdc.test/fail_compilation/ice10283.d @@ -1,4 +1,10 @@ -// 10283 +// https://issues.dlang.org/show_bug.cgi?id=10283 +/* +TEST_OUTPUT: +--- +fail_compilation/ice10283.d(14): Error: cannot implicitly convert expression `7` of type `int` to `string` +--- +*/ S10283 blah(S10283 xxx) { return xxx; } S10283 repy = blah(S10283()); diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice10599.d b/gcc/testsuite/gdc.test/fail_compilation/ice10599.d index b8be25ade0f..6e9649c486b 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/ice10599.d +++ b/gcc/testsuite/gdc.test/fail_compilation/ice10599.d @@ -1,4 +1,13 @@ -// 10599 ICE(interpret.c) +// https://issues.dlang.org/show_bug.cgi?id=10599 +// ICE(interpret.c) +/* +TEST_OUTPUT: +--- +fail_compilation/ice10599.d(13): Error: cannot implicitly convert expression `3.45` of type `double` to `int` +fail_compilation/ice10599.d(21): called from here: `bug10599()` +fail_compilation/ice10599.d(21): while evaluating: `static assert(bug10599())` +--- +*/ struct Bug { int val = 3.45; @@ -9,4 +18,4 @@ int bug10599() return 1; } -static assert(bug10599()); \ No newline at end of file +static assert(bug10599()); diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice11963.d b/gcc/testsuite/gdc.test/fail_compilation/ice11963.d index 9046f093512..39eb120827a 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/ice11963.d +++ b/gcc/testsuite/gdc.test/fail_compilation/ice11963.d @@ -1 +1,10 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/ice11963.d(10): Error: unexpected `(` in declarator +fail_compilation/ice11963.d(10): Error: identifier expected for template type parameter +fail_compilation/ice11963.d(10): Error: no identifier for declarator `A` +fail_compilation/ice11963.d(10): Error: declaration expected, not `""` +--- +*/ A("")= diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice11965.d b/gcc/testsuite/gdc.test/fail_compilation/ice11965.d index 8c036ee9690..c8db60fe9c9 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/ice11965.d +++ b/gcc/testsuite/gdc.test/fail_compilation/ice11965.d @@ -1 +1,14 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/ice11965.d(15): Error: no identifier for declarator `b*` +fail_compilation/ice11965.d(15): Error: found `End of File` when expecting `}` following compound statement +fail_compilation/ice11965.d(15): Error: found `End of File` when expecting `]` +fail_compilation/ice11965.d(15): Error: no identifier for declarator `u[() +{ +b* A; +} +]` +--- +*/ u[{b*A, diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice11967.d b/gcc/testsuite/gdc.test/fail_compilation/ice11967.d index 93b81309020..a3bda63f8fb 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/ice11967.d +++ b/gcc/testsuite/gdc.test/fail_compilation/ice11967.d @@ -1 +1,12 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/ice11967.d(12): Error: use `@(attributes)` instead of `[attributes]` +fail_compilation/ice11967.d(12): Error: expression expected, not `%` +fail_compilation/ice11967.d(12): Error: found `g` when expecting `)` +fail_compilation/ice11967.d(12): Error: found `{` when expecting `]` +fail_compilation/ice11967.d(13): Error: `@identifier` or `@(ArgumentList)` expected, not `@End of File` +fail_compilation/ice11967.d(13): Error: declaration expected following attribute, not end of file +--- +*/ [F(%g{@ diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice11968.d b/gcc/testsuite/gdc.test/fail_compilation/ice11968.d index ce0d9fcf97f..651f1623f1c 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/ice11968.d +++ b/gcc/testsuite/gdc.test/fail_compilation/ice11968.d @@ -1 +1,9 @@ +/* +TEST_OUTPUT: +---- +fail_compilation/ice11968.d(9): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead. +fail_compilation/ice11968.d(9): Error: cannot modify string literal `"fail_compilation$?:windows=\\|/$ice11968.d"` +---- +*/ + void main() { delete __FILE__ ; } diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice11974.d b/gcc/testsuite/gdc.test/fail_compilation/ice11974.d index d9f2f3007e0..3bf5a704249 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/ice11974.d +++ b/gcc/testsuite/gdc.test/fail_compilation/ice11974.d @@ -1 +1,7 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/ice11974.d(7): Error: cannot modify constant `0` +--- +*/ void main() { 0 = __LINE__ ^^ [ 0 ] ; } diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice11982.d b/gcc/testsuite/gdc.test/fail_compilation/ice11982.d index 251dada4bc3..ff5fae491c6 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/ice11982.d +++ b/gcc/testsuite/gdc.test/fail_compilation/ice11982.d @@ -1 +1,16 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/ice11982.d(16): Error: basic type expected, not `scope` +fail_compilation/ice11982.d(16): Error: found `scope` when expecting `;` following statement +fail_compilation/ice11982.d(16): Error: basic type expected, not `}` +fail_compilation/ice11982.d(16): Error: missing `{ ... }` for function literal +fail_compilation/ice11982.d(16): Error: C style cast illegal, use `cast(funk)function _error_() +{ +} +` +fail_compilation/ice11982.d(16): Error: found `}` when expecting `;` following statement +fail_compilation/ice11982.d(17): Error: found `End of File` when expecting `}` following compound statement +--- +*/ void main() { new scope ( funk ) function } diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice12673.d b/gcc/testsuite/gdc.test/fail_compilation/ice12673.d index 57f0ec00c25..fb49e8e648c 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/ice12673.d +++ b/gcc/testsuite/gdc.test/fail_compilation/ice12673.d @@ -1,3 +1,13 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/ice12673.d(13): Error: static assert: `__traits(compiles, () pure nothrow @nogc @safe +{ +__error__ +} +)` is false +--- +*/ void main() { static assert(__traits(compiles, { abcd(); })); diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice13644.d b/gcc/testsuite/gdc.test/fail_compilation/ice13644.d index 87e56e428fb..aa44709124a 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/ice13644.d +++ b/gcc/testsuite/gdc.test/fail_compilation/ice13644.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/ice13644.d(22): Error: foreach: key cannot be of non-integral type `string` +--- +*/ struct Tuple(T...) { diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice15855.d b/gcc/testsuite/gdc.test/fail_compilation/ice15855.d index 407288b17f0..e800838c45c 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/ice15855.d +++ b/gcc/testsuite/gdc.test/fail_compilation/ice15855.d @@ -1,3 +1,24 @@ // REQUIRED_ARGS: -o- +/* +TEST_OUTPUT: +--- +fail_compilation/ice15855.d(25): Error: found `End of File` when expecting `(` +fail_compilation/ice15855.d(25): Error: found `End of File` instead of statement +fail_compilation/ice15855.d(25): Error: expression expected, not `End of File` +fail_compilation/ice15855.d(25): Error: found `End of File` when expecting `;` following `for` condition +fail_compilation/ice15855.d(25): Error: expression expected, not `End of File` +fail_compilation/ice15855.d(25): Error: found `End of File` when expecting `)` +fail_compilation/ice15855.d(25): Error: found `End of File` instead of statement +fail_compilation/ice15855.d(25): Error: found `End of File` when expecting `}` following compound statement +fail_compilation/ice15855.d(25): Error: found `End of File` when expecting `]` +fail_compilation/ice15855.d(25): Error: no identifier for declarator `a[() +{ +for (; 0; 0) +{ +} +} +]` +--- +*/ a[{for diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice7782.d b/gcc/testsuite/gdc.test/fail_compilation/ice7782.d index 161995abb79..d42011a0dd0 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/ice7782.d +++ b/gcc/testsuite/gdc.test/fail_compilation/ice7782.d @@ -1,3 +1,14 @@ +/* +EXTRA_FILES: imports/ice7782algorithm.d imports/ice7782range.d +TEST_OUTPUT: +---- +fail_compilation/ice7782.d(13): Error: module `ice7782math` is in file 'imports/ice7782range/imports/ice7782math.d' which cannot be read +import path[0] = fail_compilation +import path[1] = $p:druntime/import$ +import path[2] = $p:phobos$ +---- +*/ + import imports.ice7782algorithm; import imports.ice7782range. imports.ice7782math; diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice8604.d b/gcc/testsuite/gdc.test/fail_compilation/ice8604.d index a734c2f24e1..3c179982fd9 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/ice8604.d +++ b/gcc/testsuite/gdc.test/fail_compilation/ice8604.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/ice8604.d(9): Error: undefined identifier `i` +--- +*/ struct StructFoo { static if(i) { } diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice8630.d b/gcc/testsuite/gdc.test/fail_compilation/ice8630.d index ef733dc864f..a96ef34b6c0 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/ice8630.d +++ b/gcc/testsuite/gdc.test/fail_compilation/ice8630.d @@ -1,3 +1,10 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/ice8630.d(9): Error: undefined identifier `v` +fail_compilation/ice8630.d(10): Error: template instance `ice8630.foo!(int[])` error instantiating +--- +*/ auto map(alias func, R)(R r) { return r; } typeof(v) foo(R)(R v) { return map!(p=>p)(v); } void main() { foo([1]); } diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice8742.d b/gcc/testsuite/gdc.test/fail_compilation/ice8742.d index 480a2d7357a..d8140710cf3 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/ice8742.d +++ b/gcc/testsuite/gdc.test/fail_compilation/ice8742.d @@ -1,4 +1,9 @@ -// PERMUTE_ARGS: +/* +TEST_OUTPUT: +--- +fail_compilation/ice8742.d(15): Error: class `ice8742.main.__anonclass1` is nested within `main`, but super class `D` is nested within `C` +--- +*/ class C { class D { } diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice9013.d b/gcc/testsuite/gdc.test/fail_compilation/ice9013.d index 116729fa55f..47a451b5504 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/ice9013.d +++ b/gcc/testsuite/gdc.test/fail_compilation/ice9013.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/ice9013.d(9): Error: undefined identifier `missing` +--- +*/ void main() { foreach (i; 0 .. missing) diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice9254a.d b/gcc/testsuite/gdc.test/fail_compilation/ice9254a.d index 594b5ce54fa..6b8f2f3c415 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/ice9254a.d +++ b/gcc/testsuite/gdc.test/fail_compilation/ice9254a.d @@ -1,3 +1,14 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/ice9254a.d(15): Error: Using the result of a comma expression is not allowed +fail_compilation/ice9254a.d(15): Error: Using the result of a comma expression is not allowed +fail_compilation/ice9254a.d(15): Error: Using the result of a comma expression is not allowed +fail_compilation/ice9254a.d(15): Error: Using the result of a comma expression is not allowed +fail_compilation/ice9254a.d(15): Error: Using the result of a comma expression is not allowed +fail_compilation/ice9254a.d(15): Error: invalid `foreach` aggregate `false` +--- +*/ void main() { diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice9254b.d b/gcc/testsuite/gdc.test/fail_compilation/ice9254b.d index c5a9944adb3..a430fbfdeb4 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/ice9254b.d +++ b/gcc/testsuite/gdc.test/fail_compilation/ice9254b.d @@ -1,3 +1,14 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/ice9254b.d(17): Error: Using the result of a comma expression is not allowed +fail_compilation/ice9254b.d(17): Error: Using the result of a comma expression is not allowed +fail_compilation/ice9254b.d(17): Error: Using the result of a comma expression is not allowed +fail_compilation/ice9254b.d(17): Error: Using the result of a comma expression is not allowed +fail_compilation/ice9254b.d(17): Error: Using the result of a comma expression is not allowed +fail_compilation/ice9254b.d(17): Error: invalid `foreach` aggregate `false` +--- +*/ class C { diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice9254c.d b/gcc/testsuite/gdc.test/fail_compilation/ice9254c.d index d816bbfc117..b58cfe5751a 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/ice9254c.d +++ b/gcc/testsuite/gdc.test/fail_compilation/ice9254c.d @@ -1,3 +1,14 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/ice9254c.d(15): Error: Using the result of a comma expression is not allowed +fail_compilation/ice9254c.d(15): Error: Using the result of a comma expression is not allowed +fail_compilation/ice9254c.d(15): Error: Using the result of a comma expression is not allowed +fail_compilation/ice9254c.d(15): Error: Using the result of a comma expression is not allowed +fail_compilation/ice9254c.d(15): Error: Using the result of a comma expression is not allowed +fail_compilation/ice9254c.d(15): Error: invalid `foreach` aggregate `false` +--- +*/ void main() { diff --git a/gcc/testsuite/gdc.test/fail_compilation/imphint.d b/gcc/testsuite/gdc.test/fail_compilation/imphint.d index 1e1387cbae5..2b3abeb45df 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/imphint.d +++ b/gcc/testsuite/gdc.test/fail_compilation/imphint.d @@ -1,4 +1,5 @@ -/* PERMUTE_ARGS: +/* +TEST_OUTPUT: --- fail_compilation/imphint.d(14): Error: 'printf' is not defined, perhaps you need to import core.stdc.stdio; ? fail_compilation/imphint.d(15): Error: 'writeln' is not defined, perhaps you need to import std.stdio; ? diff --git a/gcc/testsuite/gdc.test/fail_compilation/staticarrayoverflow.d b/gcc/testsuite/gdc.test/fail_compilation/staticarrayoverflow.d index f419869236b..6a5a16d1e68 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/staticarrayoverflow.d +++ b/gcc/testsuite/gdc.test/fail_compilation/staticarrayoverflow.d @@ -1,6 +1,6 @@ /* REQUIRED_ARGS: -m64 -PERMUTE_ARGS: +TEST_OUTPUT: --- fail_compilation/staticarrayoverflow.d(24): Error: static array `S[1879048192]` size overflowed to 7516192768000 fail_compilation/staticarrayoverflow.d(24): Error: variable `staticarrayoverflow.y` size overflow diff --git a/gcc/testsuite/gdc.test/fail_compilation/test1.d b/gcc/testsuite/gdc.test/fail_compilation/test1.d index 9dae856c349..aeceb52cadc 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/test1.d +++ b/gcc/testsuite/gdc.test/fail_compilation/test1.d @@ -1 +1,7 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/test1.d(8): Error: no identifier for declarator `fail` +--- +*/ fail diff --git a/gcc/testsuite/gdc.test/fail_compilation/test11176.d b/gcc/testsuite/gdc.test/fail_compilation/test11176.d index 242119e71db..020d807d8b8 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/test11176.d +++ b/gcc/testsuite/gdc.test/fail_compilation/test11176.d @@ -1,5 +1,6 @@ /* REQUIRED_ARGS: -de +TEST_OUTPUT: --- fail_compilation/test11176.d(12): Deprecation: b.ptr cannot be used in @safe code, use &b[0] instead fail_compilation/test11176.d(16): Deprecation: b.ptr cannot be used in @safe code, use &b[0] instead diff --git a/gcc/testsuite/gdc.test/fail_compilation/test143.d b/gcc/testsuite/gdc.test/fail_compilation/test143.d index 94f614a9126..1a1ed70698b 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/test143.d +++ b/gcc/testsuite/gdc.test/fail_compilation/test143.d @@ -1,5 +1,13 @@ // REQUIRED_ARGS: -de -module test143; // Bugzilla 143 +// https://issues.dlang.org/show_bug.cgi?id=143 +// EXTRA_FILES: imports/test143.d +/* +TEST_OUTPUT: +--- +fail_compilation/test143.d(20): Error: undefined identifier `x` +--- +*/ +module test143; import imports.test143; diff --git a/gcc/testsuite/gdc.test/fail_compilation/test15399.d b/gcc/testsuite/gdc.test/fail_compilation/test15399.d index 8aecfdee6dc..bad3ed29554 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/test15399.d +++ b/gcc/testsuite/gdc.test/fail_compilation/test15399.d @@ -1,4 +1,5 @@ /* https://issues.dlang.org/show_bug.cgi?id=15399 +TEST_OUTPUT: --- fail_compilation/test15399.d(31): Error: writing to misaligned pointer in field S1.ptr is not @safe fail_compilation/test15399.d(32): Error: writing to misaligned pointer in field S2.ptr is not @safe diff --git a/gcc/testsuite/gdc.test/fail_compilation/test16188.d b/gcc/testsuite/gdc.test/fail_compilation/test16188.d index ffdb41ac467..38219e987e2 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/test16188.d +++ b/gcc/testsuite/gdc.test/fail_compilation/test16188.d @@ -1,4 +1,9 @@ -/* PERMUTE_ARGS: +TEST_OUTPUT: +--- +fail_compilation/test16188.d(1): Error: no identifier for declarator `TEST_OUTPUT` +fail_compilation/test16188.d(1): Error: declaration expected, not `:` +fail_compilation/test16188.d(18): Error: unrecognized declaration +--- */ // https://issues.dlang.org/show_bug.cgi?id=16188 diff --git a/gcc/testsuite/gdc.test/fail_compilation/test5412a.d b/gcc/testsuite/gdc.test/fail_compilation/test5412a.d index 412cb214d6c..35778343cc9 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/test5412a.d +++ b/gcc/testsuite/gdc.test/fail_compilation/test5412a.d @@ -1,3 +1,10 @@ +/* +EXTRA_FILES: imports/test5412a.d imports/test5412b.d +TEST_OUTPUT: +--- +fail_compilation/test5412a.d(11): Error: import `test5412a.A` conflicts with import `test5412a.A` at fail_compilation/test5412a.d(10) +--- +*/ module test5412a; import A = imports.test5412a; diff --git a/gcc/testsuite/gdc.test/fail_compilation/test5412b.d b/gcc/testsuite/gdc.test/fail_compilation/test5412b.d index 846fdd3f00e..8f06b52658c 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/test5412b.d +++ b/gcc/testsuite/gdc.test/fail_compilation/test5412b.d @@ -1,3 +1,10 @@ +/* +EXTRA_FILES: imports/test5412a.d imports/test5412b.d +TEST_OUTPUT: +--- +fail_compilation/test5412b.d(11): Error: static import `test5412b.A` conflicts with import `test5412b.A` at fail_compilation/test5412b.d(10) +--- +*/ module test5412b; import A = imports.test5412a; diff --git a/gcc/testsuite/gdc.test/fail_compilation/test5412c.d b/gcc/testsuite/gdc.test/fail_compilation/test5412c.d index 88290f66d49..b3073ee63a1 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/test5412c.d +++ b/gcc/testsuite/gdc.test/fail_compilation/test5412c.d @@ -1,3 +1,10 @@ +/* +EXTRA_FILES: test5412c2.di imports/test5412a.d +TEST_OUTPUT: +--- +fail_compilation/test5412c.d(11): Error: import `test5412c.test5412c2` conflicts with import `test5412c.test5412c2` at fail_compilation/test5412c.d(10) +--- +*/ module test5412c; import test5412c2 = imports.test5412a; diff --git a/gcc/testsuite/gdc.test/fail_compilation/test5412c2.di b/gcc/testsuite/gdc.test/fail_compilation/test5412c2.di new file mode 100644 index 00000000000..0023c5fda49 --- /dev/null +++ b/gcc/testsuite/gdc.test/fail_compilation/test5412c2.di @@ -0,0 +1 @@ +module test5412c2; diff --git a/gcc/testsuite/gdc.test/fail_compilation/test8509.d b/gcc/testsuite/gdc.test/fail_compilation/test8509.d index 121ae9e2814..b39c00f964f 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/test8509.d +++ b/gcc/testsuite/gdc.test/fail_compilation/test8509.d @@ -1,3 +1,10 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/test8509.d(13): Error: cannot implicitly convert expression `"hello world"` of type `string` to `E` +fail_compilation/test8509.d(14): Error: cannot implicitly convert expression `"hello world"` of type `string` to `E` +--- +*/ module test8509; enum E : string { a = "hello", b = "world" } diff --git a/gcc/testsuite/gdc.test/fail_compilation/test8751.d b/gcc/testsuite/gdc.test/fail_compilation/test8751.d index f739a5a9c1f..d7057b89fc4 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/test8751.d +++ b/gcc/testsuite/gdc.test/fail_compilation/test8751.d @@ -1,3 +1,9 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/test8751.d(7): Error: undefined identifier `Bar` +--- +*/ Bar foo3(ref const int x) pure { return y => x > y; // error } diff --git a/gcc/testsuite/gdc.test/runnable/aliasthis.d b/gcc/testsuite/gdc.test/runnable/aliasthis.d index 8cd00517692..ee8e6a13ce0 100644 --- a/gcc/testsuite/gdc.test/runnable/aliasthis.d +++ b/gcc/testsuite/gdc.test/runnable/aliasthis.d @@ -1,3 +1,29 @@ +/* +TEST_OUTPUT: +--- +false +[] = int +[] = string +[0] = int +[1] = string +[] = string +[] = int +[1] = string +[0] = int +--- + +RUN_OUTPUT: +--- +1 1.1 +ctor +cpctor +dtor +cpctor +dtor +dtor +Success +--- +*/ extern (C) int printf(const(char*) fmt, ...); import core.vararg; @@ -551,7 +577,7 @@ void test2781() } eval = 0; - foreach (i, e; tup(tup((eval++, 10), 3.14), tup("str", [1,2]))) + foreach (i, e; tup(tup((){eval++; return 10;}(), 3.14), tup("str", [1,2]))) { static if (i == 0) assert(e == tup(10, 3.14)); static if (i == 1) assert(e == tup("str", [1,2])); @@ -559,7 +585,7 @@ void test2781() assert(eval == 1); eval = 0; - foreach (i, e; tup((eval++,10), tup(3.14, tup("str", tup([1,2]))))) + foreach (i, e; tup((){eval++; return 10;}(), tup(3.14, tup("str", tup([1,2]))))) { static if (i == 0) assert(e == 10); static if (i == 1) assert(e == tup(3.14, tup("str", tup([1,2])))); @@ -836,7 +862,7 @@ void test6369c() void test6369d() { int eval = 0; - Seq!(int, string) t = tup((++eval, 10), "str"); + Seq!(int, string) t = tup((){++eval; return 10;}(), "str"); assert(eval == 1); assert(t[0] == 10); assert(t[1] == "str"); diff --git a/gcc/testsuite/gdc.test/runnable/constfold.d b/gcc/testsuite/gdc.test/runnable/constfold.d index 42406ea44a5..1d259f610cf 100644 --- a/gcc/testsuite/gdc.test/runnable/constfold.d +++ b/gcc/testsuite/gdc.test/runnable/constfold.d @@ -302,7 +302,6 @@ static assert(is(typeof( (){ C4 g = 7; C4 h = g;}))); alias uint DWORD; MY_API_FUNCTION lpStartAddress; extern (Windows) alias DWORD function(void*) MY_API_FUNCTION; -pragma(msg, MY_API_FUNCTION.stringof); static assert(MY_API_FUNCTION.stringof == "extern (Windows) uint function(void*)"); /************************************/ @@ -565,7 +564,8 @@ void test13977() Object.init && check(); assert(x == 0); - (check(2), false) && check(); + check(2); + false && check(); assert(x == 2); x = 0; } @@ -594,7 +594,8 @@ void test13978() Object.init || check(); assert(x == 1); x = 0; - (check(2), true) || check(); + check(2); + true || check(); assert(x == 2); x = 0; } diff --git a/gcc/testsuite/gdc.test/runnable/ctorpowtests.d b/gcc/testsuite/gdc.test/runnable/ctorpowtests.d index 1b81a9eb7b4..89f846a96e5 100644 --- a/gcc/testsuite/gdc.test/runnable/ctorpowtests.d +++ b/gcc/testsuite/gdc.test/runnable/ctorpowtests.d @@ -141,7 +141,8 @@ static assert(bazra(14)==64); void moreCommaTests() { - auto k = (containsAsm(), containsAsm()); + (containsAsm(), containsAsm()); + auto k = containsAsm(); for (int i=0; i< k^^2; i+=StructWithCtor(1).n) {} } diff --git a/gcc/testsuite/gdc.test/runnable/declaration.d b/gcc/testsuite/gdc.test/runnable/declaration.d index 0b6c6b530db..0dbd2876d4e 100644 --- a/gcc/testsuite/gdc.test/runnable/declaration.d +++ b/gcc/testsuite/gdc.test/runnable/declaration.d @@ -1,3 +1,16 @@ +/* +TEST_OUTPUT: +--- +S7019(16), 16 +S7019(24), 24 +S7019(32), 32 +--- + +RUN_OUTPUT: +--- +Success +--- +*/ extern(C) int printf(const char*, ...); diff --git a/gcc/testsuite/gdc.test/runnable/foreach5.d b/gcc/testsuite/gdc.test/runnable/foreach5.d index 59ee9065af3..003a34a8e6d 100644 --- a/gcc/testsuite/gdc.test/runnable/foreach5.d +++ b/gcc/testsuite/gdc.test/runnable/foreach5.d @@ -1,3 +1,16 @@ +/* +TEST_OUTPUT: +--- +int +double +foobar7406(T) +test7406() +int +foobar7406(T) +int +test7406() +--- +*/ extern(C) int printf(const char* fmt, ...); diff --git a/gcc/testsuite/gdc.test/runnable/funclit.d b/gcc/testsuite/gdc.test/runnable/funclit.d index d18e88a21db..d45e3e6ddfd 100644 --- a/gcc/testsuite/gdc.test/runnable/funclit.d +++ b/gcc/testsuite/gdc.test/runnable/funclit.d @@ -1,3 +1,19 @@ +/* +TEST_OUTPUT: +--- +int delegate() pure nothrow @nogc @safe delegate() pure nothrow @nogc @safe delegate() pure nothrow @safe +int delegate() pure nothrow @nogc @safe delegate() pure nothrow @nogc @safe delegate() pure nothrow @safe +int +int +int[] +int delegate() pure nothrow @nogc @safe function() pure nothrow @safe +--- + +RUN_OUTPUT: +--- +Success +--- +*/ import core.vararg; extern (C) int printf(const char*, ...); diff --git a/gcc/testsuite/gdc.test/runnable/future.d b/gcc/testsuite/gdc.test/runnable/future.d index 0b6fd959a51..1a91d305357 100644 --- a/gcc/testsuite/gdc.test/runnable/future.d +++ b/gcc/testsuite/gdc.test/runnable/future.d @@ -1,4 +1,8 @@ /* PERMUTE_ARGS: +TEST_OUTPUT: +--- +runnable/future.d(15): Deprecation: `@__future` base class method `future.A.msg` is being overridden by `future.B.msg`; rename the latter +--- */ class A diff --git a/gcc/testsuite/gdc.test/runnable/imports/link15194std.d b/gcc/testsuite/gdc.test/runnable/imports/link15194std.d index 95c63ce99c9..baa9d552592 100644 --- a/gcc/testsuite/gdc.test/runnable/imports/link15194std.d +++ b/gcc/testsuite/gdc.test/runnable/imports/link15194std.d @@ -30,7 +30,6 @@ else struct SetUnion(Rs...) { - pragma(msg, Rs); Rs r; // Rs[0] == RBRange!(RBNode!int*) diff --git a/gcc/testsuite/gdc.test/runnable/interpret.d b/gcc/testsuite/gdc.test/runnable/interpret.d index b822cadfcd0..fe44744fcfc 100644 --- a/gcc/testsuite/gdc.test/runnable/interpret.d +++ b/gcc/testsuite/gdc.test/runnable/interpret.d @@ -1,4 +1,22 @@ -// RUNNABLE_PHOBOS_TEST +/* RUNNABLE_PHOBOS_TEST +TEST_OUTPUT: +--- +true +g +&Test109S(&Test109S()) +runnable/interpret.d(3197): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead. +runnable/interpret.d(3199): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead. +runnable/interpret.d(3202): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead. +runnable/interpret.d(3205): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead. +runnable/interpret.d(3206): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead. +runnable/interpret.d(3212): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead. +runnable/interpret.d(3213): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead. +runnable/interpret.d(3216): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead. +tfoo +tfoo +Crash! +--- +*/ import std.stdio; template Tuple(A...) diff --git a/gcc/testsuite/gdc.test/runnable/lazy.d b/gcc/testsuite/gdc.test/runnable/lazy.d index b9d0fd2afc5..c1846190aed 100644 --- a/gcc/testsuite/gdc.test/runnable/lazy.d +++ b/gcc/testsuite/gdc.test/runnable/lazy.d @@ -75,7 +75,7 @@ void test1() ); whiler( x < 100, - (printf("%d\n", x), x *= 2) + (){ printf("%d\n", x); x *= 2; }() ); } diff --git a/gcc/testsuite/gdc.test/runnable/link10920.d b/gcc/testsuite/gdc.test/runnable/link10920.d index 29f3a47f44f..7c3e3de3a71 100644 --- a/gcc/testsuite/gdc.test/runnable/link10920.d +++ b/gcc/testsuite/gdc.test/runnable/link10920.d @@ -1,4 +1,5 @@ // PERMUTE_ARGS: -version=A +// EXTRA_FILES: imports/link10920a.d // It's imported but won't be linked. import imports.link10920a; @@ -10,7 +11,7 @@ void main() { // Run semantic3 of BitArray.toString() // before the FormatSpec instantiation in main(). - pragma(msg, typeof(ba.toString())); + static assert(is(typeof(ba.toString()))); } // The instance codegen should be run always, unrelated with -version=A. diff --git a/gcc/testsuite/gdc.test/runnable/link15021.d b/gcc/testsuite/gdc.test/runnable/link15021.d index 62918a26e3e..2e82610148d 100644 --- a/gcc/testsuite/gdc.test/runnable/link15021.d +++ b/gcc/testsuite/gdc.test/runnable/link15021.d @@ -1,4 +1,11 @@ // PERMUTE_ARGS: -inline -g -debug -unittest +// EXTRA_FILES: imports/std15021conv.d +/* +TEST_OUTPUT: +--- +hit! +--- +*/ import imports.std15021conv; diff --git a/gcc/testsuite/gdc.test/runnable/link6574.d b/gcc/testsuite/gdc.test/runnable/link6574.d index ab5e552536b..53e95f21ca9 100644 --- a/gcc/testsuite/gdc.test/runnable/link6574.d +++ b/gcc/testsuite/gdc.test/runnable/link6574.d @@ -1,4 +1,14 @@ // PERMUTE_ARGS: +// EXTRA_FILES: imports/testmangle.d +/* +TEST_OUTPUT: +--- +_D7imports10testmangle12detectMangleFPSQBlQBg6DetectZQq +_D7imports10testmangle__T10DetectTmplTiZQpFNaNbNiNfZv +true +false +--- +*/ module link6574; import imports.testmangle; diff --git a/gcc/testsuite/gdc.test/runnable/mangle.d b/gcc/testsuite/gdc.test/runnable/mangle.d index 883d58ac07c..e6d36453d88 100644 --- a/gcc/testsuite/gdc.test/runnable/mangle.d +++ b/gcc/testsuite/gdc.test/runnable/mangle.d @@ -1,5 +1,15 @@ // PERMUTE_ARGS: // EXTRA_SOURCES: imports/mangle10077.d +// EXTRA_FILES: imports/testmangle.d +/* +TEST_OUTPUT: +--- +_D7imports10testmangle12detectMangleFPSQBlQBg6DetectZQq +_D7imports10testmangle__T10DetectTmplTiZQpFNaNbNiNfZv +true +false +--- +*/ import imports.testmangle; diff --git a/gcc/testsuite/gdc.test/runnable/mixin2.d b/gcc/testsuite/gdc.test/runnable/mixin2.d index 3591d1200e0..26a235210c9 100644 --- a/gcc/testsuite/gdc.test/runnable/mixin2.d +++ b/gcc/testsuite/gdc.test/runnable/mixin2.d @@ -1,4 +1,36 @@ -// RUNNABLE_PHOBOS_TEST +/* RUNNABLE_PHOBOS_TEST +TEST_OUTPUT: +--- +hello +hello + + + +hello +hello +--- + +RUN_OUTPUT: +--- +31 +42 +53 +64 +75 +86 +97 +108 +119 +1210 +5 +test4 +Constructor + Inside Scope +Destructor +hey +Success +--- +*/ import std.stdio; /*********************************************/ diff --git a/gcc/testsuite/gdc.test/runnable/nested.d b/gcc/testsuite/gdc.test/runnable/nested.d index fa012b5664e..6b2fcb06ab2 100644 --- a/gcc/testsuite/gdc.test/runnable/nested.d +++ b/gcc/testsuite/gdc.test/runnable/nested.d @@ -1,4 +1,10 @@ // REQUIRED_ARGS: +/* +TEST_OUTPUT: +--- +null +--- +*/ import core.stdc.stdio; diff --git a/gcc/testsuite/gdc.test/runnable/nulltype.d b/gcc/testsuite/gdc.test/runnable/nulltype.d index c400d7f61f1..7a1f1c333b4 100644 --- a/gcc/testsuite/gdc.test/runnable/nulltype.d +++ b/gcc/testsuite/gdc.test/runnable/nulltype.d @@ -1,3 +1,16 @@ +/* +TEST_OUTPUT: +--- +pure nothrow @safe Object(bool b) +pure nothrow @safe int*(bool b) +pure nothrow @safe int[](bool b) +--- + +RUN_OUTPUT: +--- +Success +--- +*/ extern (C) int printf(const(char*) fmt, ...); alias typeof(null) null_t; diff --git a/gcc/testsuite/gdc.test/runnable/property2.d b/gcc/testsuite/gdc.test/runnable/property2.d index 0735b93509d..1c5cf30aff0 100644 --- a/gcc/testsuite/gdc.test/runnable/property2.d +++ b/gcc/testsuite/gdc.test/runnable/property2.d @@ -1,4 +1,24 @@ // PERMUTE_ARGS: -property +/* +TEST_OUTPUT: +--- +decl: test +stmt: test +--- + +RUN_OUTPUT: +--- +0: getter +1: setter +2: getter +3: setter +4: setter +5: compile error +6: compile error +7: setter +Success +--- +*/ extern (C) int printf(const char* fmt, ...); diff --git a/gcc/testsuite/gdc.test/runnable/sdtor.d b/gcc/testsuite/gdc.test/runnable/sdtor.d index ed58bcff9c8..3edf8cf85aa 100644 --- a/gcc/testsuite/gdc.test/runnable/sdtor.d +++ b/gcc/testsuite/gdc.test/runnable/sdtor.d @@ -1,4 +1,18 @@ // PERMUTE_ARGS: -unittest -O -release -inline -fPIC -g +/* +TEST_OUTPUT: +--- +runnable/sdtor.d(36): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead. +runnable/sdtor.d(59): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead. +runnable/sdtor.d(93): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead. +runnable/sdtor.d(117): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead. +runnable/sdtor.d(143): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead. +runnable/sdtor.d(177): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead. +runnable/sdtor.d(203): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead. +runnable/sdtor.d(276): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead. +S7353 +--- +*/ import core.vararg; @@ -879,8 +893,10 @@ void test34() X34[2] xs; // xs[0][0] = X34(); printf("foreach\n"); - for (int j = 0; j < xs.length; j++) { auto x = (j++,j--,xs[j]); - //foreach(x; xs) { + for (int j = 0; j < xs.length; j++) { + j++,j--; + auto x = xs[j]; + //foreach(x; xs) //printf("foreach x.i = %d\n", x[0].i); //assert(x[0].i == 1); printf("foreach x.i = %d\n", x.i); @@ -1395,22 +1411,22 @@ void test54() assert(S54.t == "c"); { S54.t = null; - int b = 1 && (bar54(S54(1)), 1); + int b = 1 && (){ bar54(S54(1)); return 1;}(); } assert(S54.t == "ac"); { S54.t = null; - int b = 0 && (bar54(S54(1)), 1); + int b = 0 && (){ bar54(S54(1)); return 1;}(); } assert(S54.t == ""); { S54.t = null; - int b = 0 || (bar54(S54(1)), 1); + int b = 0 || (){ bar54(S54(1)); return 1;}(); } assert(S54.t == "ac"); { S54.t = null; - int b = 1 || (bar54(S54(1)), 1); + int b = 1 || (){ bar54(S54(1)); return 1;}(); } assert(S54.t == ""); @@ -1529,7 +1545,8 @@ void test57() printf("----\n"); //+ dtor_cnt = 0; - if (auto s = (S57(1), S57(2), S57(10))) + S57(1), S57(2); + if (auto s = S57(10)) { assert(dtor_cnt == 2); printf("ifbody\n"); @@ -1562,7 +1579,8 @@ void test57() printf("----\n"); //+ dtor_cnt = 0; - if (auto s = (f(1), f(2), f(10))) + f(1), f(2); + if (auto s = f(10)) { assert(dtor_cnt == 2); printf("ifbody\n"); @@ -1596,7 +1614,8 @@ void test57() printf("----\n"); dtor_cnt = 0; - if ((S57(1), S57(2), S57(10))) + S57(1), S57(2); + if (S57(10)) { assert(dtor_cnt == 3); printf("ifbody\n"); @@ -1628,7 +1647,8 @@ void test57() printf("----\n"); dtor_cnt = 0; - if ((f(1), f(2), f(10))) + f(1), f(2); + if (f(10)) { assert(dtor_cnt == 3); printf("ifbody\n"); @@ -4432,7 +4452,8 @@ struct S64 S64 foo64() { - return S64((X64(), 1)); + X64(); + return S64(1); } void test64() diff --git a/gcc/testsuite/gdc.test/runnable/stress.d b/gcc/testsuite/gdc.test/runnable/stress.d index b15725369be..a8c6c91008c 100644 --- a/gcc/testsuite/gdc.test/runnable/stress.d +++ b/gcc/testsuite/gdc.test/runnable/stress.d @@ -89,8 +89,8 @@ void MDCHAR() if(str[ITERS-1][0].sizeof != (typ).sizeof) printf("Size Error: %d\n",str[ITERS-1][0].sizeof); foreach(s; str) { - int lstart; - foreach(int idx, char c; s) { + size_t lstart; + foreach(size_t idx, char c; s) { if(c == '\n') { typ[] t = s[lstart..idx]; if(t != "TEST LINE") { @@ -108,8 +108,8 @@ void MDCHAR() } foreach(s; splitLines(cast(string)tmp)) { - int lstart; - foreach(int idx, char c; s) { + size_t lstart; + foreach(size_t idx, char c; s) { if(c == '\n') { if(s[lstart..idx] != "TEST LINE") { printf("Error testing character array\n"); @@ -134,8 +134,8 @@ void CHAR() if(str.length != (ITERS * 10)) printf("Length Error: %d\n",str.length); if(str.sizeof != (typ[]).sizeof) printf("Size Error: %d\n",str.sizeof); - int lstart; - foreach(int idx, char c; str) { + size_t lstart; + foreach(size_t idx, char c; str) { if(c == '\n') { if(str[lstart..idx] != "TEST LINE") { printf("Error testing character array\n"); @@ -159,8 +159,8 @@ void WCHAR() if(str.length != (ITERS * 10)) printf("Length Error: %d\n",str.length); if(str.sizeof != (typ[]).sizeof) printf("Size Error: %d\n",str.sizeof); - int lstart; - foreach(int idx, char c; str) { + size_t lstart; + foreach(size_t idx, char c; str) { if(c == '\n') { if(str[lstart..idx] != toUTF16(cast(char[])"TEST LINE")) { printf("Error testing character array\n"); @@ -184,8 +184,8 @@ void DCHAR() if(str.length != (ITERS * 10)) printf("Length Error: %d\n",str.length); if(str.sizeof != (typ[]).sizeof) printf("Size Error: %d\n",str.sizeof); - int lstart; - foreach(int idx, char c; str) { + size_t lstart; + foreach(size_t idx, char c; str) { if(c == '\n') { if(str[lstart..idx] != toUTF32(cast(char[])"TEST LINE")) { printf("Error testing character array\n"); diff --git a/gcc/testsuite/gdc.test/runnable/structlit.d b/gcc/testsuite/gdc.test/runnable/structlit.d index 9adcc7d9cbd..38af612e351 100644 --- a/gcc/testsuite/gdc.test/runnable/structlit.d +++ b/gcc/testsuite/gdc.test/runnable/structlit.d @@ -1295,7 +1295,7 @@ struct Z11256c(Ranges...) struct F11256(alias pred) { - this(int[] = null) { } + this(int[]) { } } Z!Ranges z11256(alias Z, Ranges...)(Ranges ranges) @@ -1305,9 +1305,9 @@ Z!Ranges z11256(alias Z, Ranges...)(Ranges ranges) void test11256() { - z11256!Z11256a(S11256.init, F11256!(gv => true)()); - z11256!Z11256b(S11256.init, F11256!(gv => true)()); - z11256!Z11256c(S11256.init, F11256!(gv => true)()); + z11256!Z11256a(S11256.init, F11256!(gv => true)(null)); + z11256!Z11256b(S11256.init, F11256!(gv => true)(null)); + z11256!Z11256c(S11256.init, F11256!(gv => true)(null)); } /********************************************/ diff --git a/gcc/testsuite/gdc.test/runnable/template3.d b/gcc/testsuite/gdc.test/runnable/template3.d index 0c03ca39ad7..e3313672d08 100644 --- a/gcc/testsuite/gdc.test/runnable/template3.d +++ b/gcc/testsuite/gdc.test/runnable/template3.d @@ -1,3 +1,18 @@ +/* +TEST_OUTPUT: +--- +instantiating... +instantiating... +last instantiation!!! +--- + +RUN_OUTPUT: +--- +1 +3 +Success +--- +*/ import core.stdc.stdio; diff --git a/gcc/testsuite/gdc.test/runnable/template4.d b/gcc/testsuite/gdc.test/runnable/template4.d index 81723f60182..0381d890ceb 100644 --- a/gcc/testsuite/gdc.test/runnable/template4.d +++ b/gcc/testsuite/gdc.test/runnable/template4.d @@ -1,4 +1,15 @@ -// RUNNABLE_PHOBOS_TEST +/* RUNNABLE_PHOBOS_TEST +TEST_OUTPUT: +--- +This actually gets evaluated! +() +(bool) +(bool, short) +(bool, short, int) +Alias Test instantiated +Alias Test instantiated +--- +*/ import std.stdio; import core.stdc.stdio; diff --git a/gcc/testsuite/gdc.test/runnable/template8.d b/gcc/testsuite/gdc.test/runnable/template8.d index ce0edf1cf24..3f706872db8 100644 --- a/gcc/testsuite/gdc.test/runnable/template8.d +++ b/gcc/testsuite/gdc.test/runnable/template8.d @@ -36,17 +36,17 @@ private string CreateAccessors( static assert(len == 1); // getter result ~= "bool " ~ name ~ "(){ return " - "("~store~" & "~toStringSfx(maskAllElse)~") != 0;}"; + ~ "("~store~" & "~toStringSfx(maskAllElse)~") != 0;}"; // setter result ~= "void " ~ name ~ "(bool v){" - "if (v) "~store~" |= "~toStringSfx(maskAllElse)~";" - "else "~store~" &= "~toStringSfx(maskMyself)~";}"; + ~ "if (v) "~store~" |= "~toStringSfx(maskAllElse)~";" + ~ "else "~store~" &= "~toStringSfx(maskMyself)~";}"; } else { // getter result ~= T.stringof ~ " " ~ name ~ "(){ auto result = " - "("~store~" & " + ~ "("~store~" & " ~ toStringSfx(maskAllElse) ~ ") >>" ~ toStringSfx(offset) ~ ";"; static if (T.min < 0) diff --git a/gcc/testsuite/gdc.test/runnable/template9.d b/gcc/testsuite/gdc.test/runnable/template9.d index b016ff91043..486eb67ab09 100644 --- a/gcc/testsuite/gdc.test/runnable/template9.d +++ b/gcc/testsuite/gdc.test/runnable/template9.d @@ -1,5 +1,53 @@ -// RUNNABLE_PHOBOS_TEST -// PERMUTE_ARGS: +/* RUNNABLE_PHOBOS_TEST +PERMUTE_ARGS: +EXTRA_FILES: imports/testmangle.d +TEST_OUTPUT: +--- +func +double +All good 1 +All good 2 +All good 3 +_D7imports10testmangle12detectMangleFPSQBlQBg6DetectZQq +_D7imports10testmangle__T10DetectTmplTiZQpFNaNbNiNfZv +true +false +uint +int[] +int[] +const(K5886) +4 ; const(K5886) +8 ; const(K5886) +K5886 +immutable(K5886) +4 ; K5886 +4 ; immutable(K5886) +1 ; K5886 +2 ; const(K5886) +3 ; immutable(K5886) +8 ; K5886 +9 ; const(K5886) +10 ; immutable(K5886) +> U = int, N:$?:64=ulong = 3LU|32=uint = 3u$ +K=string, V=int +K=char, V=string +T = SA, E = int, dim = $?:64=5LU|32=5u$ +T = DA, E = int +T = AA, K = string, V = int +pure nothrow @nogc @safe void(int t) +pure nothrow @nogc @safe void(int t) +T = byte +T = char +--- + +RUN_OUTPUT: +--- +typeof(T)=double typeof(S)=int +typeof(T)=double typeof(S)=int +typeof(T)=float typeof(S)=int +Success +--- +*/ module breaker; diff --git a/gcc/testsuite/gdc.test/runnable/test15.d b/gcc/testsuite/gdc.test/runnable/test15.d index 234f50b2749..405171e44ae 100644 --- a/gcc/testsuite/gdc.test/runnable/test15.d +++ b/gcc/testsuite/gdc.test/runnable/test15.d @@ -901,12 +901,12 @@ void test49() void foo50(int[] f, ...) { - foreach(int i, TypeInfo ti; _arguments) { } + foreach(size_t i, TypeInfo ti; _arguments) { } } void bar50(out int[] f, ...) { - foreach(int i, TypeInfo ti; _arguments) { } + foreach(size_t i, TypeInfo ti; _arguments) { } } void test50() diff --git a/gcc/testsuite/gdc.test/runnable/test22.d b/gcc/testsuite/gdc.test/runnable/test22.d index bd0487845b3..2aabb4d95d1 100644 --- a/gcc/testsuite/gdc.test/runnable/test22.d +++ b/gcc/testsuite/gdc.test/runnable/test22.d @@ -202,7 +202,9 @@ class B9 { A9 test1 = new A9(1, 2, 3); A9 test2 = new A9(1, 2, 3, 4); - int[3] arg; A9 test3 = new A9((arg[0]=1, arg[1]=2, arg[2]=3, arg)); + int[3] arg; + arg[0]=1, arg[1]=2, arg[2]=3; + A9 test3 = new A9(arg); } } diff --git a/gcc/testsuite/gdc.test/runnable/test34.d b/gcc/testsuite/gdc.test/runnable/test34.d index 6e2b36846c9..e38ab1c858d 100644 --- a/gcc/testsuite/gdc.test/runnable/test34.d +++ b/gcc/testsuite/gdc.test/runnable/test34.d @@ -1,4 +1,11 @@ // RUNNABLE_PHOBOS_TEST +/* +TEST_OUTPUT: +--- +Object +--- +*/ + module test34; import std.stdio; diff --git a/gcc/testsuite/gdc.test/runnable/test42.d b/gcc/testsuite/gdc.test/runnable/test42.d index 66b3c04e0bb..e887faea2eb 100644 --- a/gcc/testsuite/gdc.test/runnable/test42.d +++ b/gcc/testsuite/gdc.test/runnable/test42.d @@ -1,8 +1,18 @@ -// RUNNABLE_PHOBOS_TEST -// REQUIRED_ARGS: +/* RUNNABLE_PHOBOS_TEST +REQUIRED_ARGS: +TEST_OUTPUT: +--- +success +myInt int +myBool bool +i +s +C6test42__T4T219TiZ1C +C6test427test219FZ8__mixin11C +--- +*/ module test42; - import std.stdio; import core.stdc.stdio; import std.string; @@ -52,7 +62,7 @@ void test3() { auto i = mixin("__LINE__"); writefln("%d", i); - assert(i == 53); + assert(i == 63); } /***************************************************/ @@ -1092,17 +1102,17 @@ void test71() { size_t s = Foo71!( "helloabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" -"helloabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" -"helloabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" -"helloabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" -"helloabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" -"helloabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" -"helloabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" -"helloabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" -"helloabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" -"helloabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" -"helloabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" -"When dealing with complex template tuples, it's very easy to overflow the +~ "helloabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" +~ "helloabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" +~ "helloabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" +~ "helloabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" +~ "helloabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" +~ "helloabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" +~ "helloabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" +~ "helloabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" +~ "helloabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" +~ "helloabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" +~ "When dealing with complex template tuples, it's very easy to overflow the maximum symbol length allowed by OPTLINK. This is, simply put, a damn shame, because it prevents otherwise completely legal code from compiling and linking with DMDWin, whereas it works perfectly fine when using DMDNix or GDC. @@ -1980,7 +1990,7 @@ struct Foobar; int test124() { int result; dchar[] aa; - alias uint foo_t; + alias size_t foo_t; foreach (foo_t i, dchar d; aa) { @@ -3507,7 +3517,7 @@ void test215() enum assocarrayliteral = Q!( [1:2] ).q.stringof; enum complex80 = Q!( 1+1.0i ).q.stringof; //enum dottype = Q!( C.Object.toString ).q.stringof; - enum halt = (assert(0), 0).stringof; // ICE w/ -release + enum halt = 0.stringof; // ICE w/ -release //enum remove = Q!( [1:2].remove(1) ).q.stringof; enum templat = Q!( Q ).q.stringof; } diff --git a/gcc/testsuite/gdc.test/runnable/test8.d b/gcc/testsuite/gdc.test/runnable/test8.d index f8b800f18bd..4927bbc97ed 100644 --- a/gcc/testsuite/gdc.test/runnable/test8.d +++ b/gcc/testsuite/gdc.test/runnable/test8.d @@ -696,7 +696,7 @@ void test38() printf("Count: %d\n", count); assert(count == 1028); } - catch + catch(Throwable) { printf("Exception: %d\n", k); assert(0); diff --git a/gcc/testsuite/gdc.test/runnable/testaa.d b/gcc/testsuite/gdc.test/runnable/testaa.d index 75e8172ab49..34cc705c08d 100644 --- a/gcc/testsuite/gdc.test/runnable/testaa.d +++ b/gcc/testsuite/gdc.test/runnable/testaa.d @@ -512,7 +512,7 @@ int foo17() }catch(Error e){ assert(e); return 0; - }catch{ + }catch(Throwable){ assert(0); } assert(0); diff --git a/gcc/testsuite/gdc.test/runnable/testaa2.d b/gcc/testsuite/gdc.test/runnable/testaa2.d index d9256039788..17de1679d8b 100644 --- a/gcc/testsuite/gdc.test/runnable/testaa2.d +++ b/gcc/testsuite/gdc.test/runnable/testaa2.d @@ -151,7 +151,7 @@ void test3825() * it has no side effect. Then optimizer eliminate it completely, and * whole expression succeed to run in runtime. */ int n = 0; - assert(thrown(aax[(n=aax[1], 0)] = 0)); // accessing aax[1] in key part, throws OK + assert(thrown(aax[((){ n=aax[1]; return 0;}())] = 0)); // accessing aax[1] in key part, throws OK // This works as expected. int[int][int] aaa; diff --git a/gcc/testsuite/gdc.test/runnable/testassign.d b/gcc/testsuite/gdc.test/runnable/testassign.d index f20da4afdf2..b0009671b19 100644 --- a/gcc/testsuite/gdc.test/runnable/testassign.d +++ b/gcc/testsuite/gdc.test/runnable/testassign.d @@ -1,3 +1,23 @@ +/* +TEST_OUTPUT: +--- +\ S1 S2a S2b S3a S3b S4a S4b +- true true true true true true true +Xa true true true true true true true +Xb true true true true true true true +Xc true true true true true true true +Xd true true true true true true true +Xe true true true true true true true +Xf true true true true true true true +Xg true true true true true true true +--- + +RUN_OUTPUT: +--- +Success +--- +*/ + import core.stdc.stdio; template TypeTuple(T...){ alias T TypeTuple; } diff --git a/gcc/testsuite/gdc.test/runnable/testconst.d b/gcc/testsuite/gdc.test/runnable/testconst.d index 42f9c1beb7f..7ec42452ec5 100644 --- a/gcc/testsuite/gdc.test/runnable/testconst.d +++ b/gcc/testsuite/gdc.test/runnable/testconst.d @@ -1,3 +1,45 @@ +/* +TEST_OUTPUT: +--- +const(immutable(char)*) +inout(immutable(char)*) +inout(const(char)*) +inout(const(char)) +shared(inout(char)) +shared(inout(char)) +immutable(char) +immutable(char) +inout(const(char)) +inout(const(char)) +shared(const(char)) +shared(const(char)) +inout(char*****) +inout(char****)* +const(char*****) +const(char****)* +immutable(char*****) +immutable(char****)* +shared(char*****) +shared(char****)* +const(shared(char****)*) +shared(const(char*****)) +shared(char*****) +immutable(char*****) +inout(shared(char****)*) +inout(shared(char**)***) +shared(inout(char**)) +immutable(string) +const(char[]) +char[] +shared(foo85) +const(char[26]) +const(char[26]) +immutable(char[26]) +immutable(char[26]) +string +int[3] +--- +*/ import core.stdc.stdio; diff --git a/gcc/testsuite/gdc.test/runnable/testdstress.d b/gcc/testsuite/gdc.test/runnable/testdstress.d index f06f93982a5..a416b8a8c85 100644 --- a/gcc/testsuite/gdc.test/runnable/testdstress.d +++ b/gcc/testsuite/gdc.test/runnable/testdstress.d @@ -1,7 +1,7 @@ // RUNNABLE_PHOBOS_TEST // PERMUTE_ARGS: -module dstress.run.module_01; +module run.module_01; import core.memory; import core.exception; @@ -171,9 +171,9 @@ int i; void test7() { - assert(dstress.run.module_01.i==0); - dstress.run.module_01.i++; - assert(dstress.run.module_01.i==1); + assert(run.module_01.i==0); + run.module_01.i++; + assert(run.module_01.i==1); } /* ================================ */ @@ -414,7 +414,7 @@ void test19() { try{ throw new Alias19(); - }catch{ + }catch(Throwable){ return; } assert(0); @@ -484,7 +484,7 @@ void test23() { try{ foo23(); - }catch{ + }catch(Throwable){ } assert(status23==-1); } @@ -515,7 +515,7 @@ void test24() assert(status24==0); try{ check24(); - }catch{ + }catch(Throwable){ assert(status24==1); status24-=5; } @@ -700,7 +700,7 @@ void test32() assert(!(ti is null)); writefln("%s %d %d", ti.toString(), ti.tsize, (MyUnion32*).sizeof); assert(ti.tsize==(MyUnion32*).sizeof); - assert(ti.toString()=="dstress.run.module_01.MyUnion32*"); + assert(ti.toString()=="run.module_01.MyUnion32*"); } /* ================================ */ @@ -831,7 +831,7 @@ void test40() try{ assert(!checked40); GrandChild40 gc = new GrandChild40(); - }catch{ + }catch(Throwable){ assert(checked40); return; } diff --git a/gcc/testsuite/gdc.test/runnable/testenum.d b/gcc/testsuite/gdc.test/runnable/testenum.d index 9ecf97a4b28..05327449209 100644 --- a/gcc/testsuite/gdc.test/runnable/testenum.d +++ b/gcc/testsuite/gdc.test/runnable/testenum.d @@ -1,4 +1,10 @@ -// PERMUTE_ARGS: +/* +PERMUTE_ARGS: +RUN_OUTPUT: +--- +Success +--- +*/ extern(C) int printf(const char*, ...); @@ -189,7 +195,6 @@ void test2407() b = ES.b, c = ES.c, } - static assert(EES.init == ES.init); static assert(EES.init == S(1)); static assert(!__traits(compiles, EES.min)); static assert(!__traits(compiles, EES.max)); diff --git a/gcc/testsuite/gdc.test/runnable/testmodule.d b/gcc/testsuite/gdc.test/runnable/testmodule.d index 5d81588de9d..45da7d1659d 100644 --- a/gcc/testsuite/gdc.test/runnable/testmodule.d +++ b/gcc/testsuite/gdc.test/runnable/testmodule.d @@ -9,13 +9,13 @@ // @uri@ news:ct428n$2qoe$1@digitaldaemon.com // @url@ nntp://news.digitalmars.com/D.gnu/983 -module dstress.run.unicode_06_哪里; +module run.unicode_06_哪里; int 哪里(int ö){ return ö+2; } int main(){ - assert(dstress.run.unicode_06_哪里.哪里(2)==4); + assert(run.unicode_06_哪里.哪里(2)==4); return 0; } diff --git a/gcc/testsuite/gdc.test/runnable/testrightthis.d b/gcc/testsuite/gdc.test/runnable/testrightthis.d index 11851327b90..32879ce3e4c 100644 --- a/gcc/testsuite/gdc.test/runnable/testrightthis.d +++ b/gcc/testsuite/gdc.test/runnable/testrightthis.d @@ -1,5 +1,11 @@ -// runnable/traits.d 9091,8972,8971,7027 -// runnable/test4.d test6() +/* +runnable/traits.d 9091,8972,8971,7027 +runnable/test4.d test6() +RUN_OUTPUT: +--- +Success +--- +*/ extern(C) int printf(const char*, ...); @@ -578,7 +584,6 @@ class Bar11245 { void func() { - pragma(msg, "===="); float[Vec11245.f.length] newVal; } } diff --git a/gcc/testsuite/gdc.test/runnable/testscope2.d b/gcc/testsuite/gdc.test/runnable/testscope2.d index 6c96fb5873d..85282c2aae8 100644 --- a/gcc/testsuite/gdc.test/runnable/testscope2.d +++ b/gcc/testsuite/gdc.test/runnable/testscope2.d @@ -1,5 +1,14 @@ // RUNNABLE_PHOBOS_TEST // REQUIRED_ARGS: -dip25 +/* +TEST_OUTPUT: +--- +foo1 ulong function(return ref int* delegate() return p) ref return +foo2 int function(return ref int delegate() p) ref +foo3 int function(return ref inout(int*) p) ref +foo4 int function(return ref inout(int*) p) ref +--- +*/ import core.stdc.stdio; diff --git a/gcc/testsuite/gdc.test/runnable/traits.d b/gcc/testsuite/gdc.test/runnable/traits.d index 3cdfe83afa0..9d14ecdcc09 100644 --- a/gcc/testsuite/gdc.test/runnable/traits.d +++ b/gcc/testsuite/gdc.test/runnable/traits.d @@ -1,5 +1,20 @@ // RUNNABLE_PHOBOS_TEST -// PERMUTE_ARGS: +/* +PERMUTE_ARGS: +EXTRA_FILES: imports/a9546.d + +Windows linker may write something like: +--- +Creating library {{RESULTS_DIR}}/runnable/traits_0.lib and object {{RESULTS_DIR}}/runnable/traits_0.exp +--- + +TRANSFORM_OUTPUT: remove_lines("Creating library") +TEST_OUTPUT: +--- +__lambda1 +--- +*/ + module traits; import std.stdio; @@ -1561,6 +1576,15 @@ void test15094() assert(n == bar.foo.i); } +/********************************************************/ + +void testIsDisabled() +{ + static assert(__traits(isDisabled, D1.true_)); + static assert(!__traits(isDisabled, D1.false_)); + static assert(!__traits(isDisabled, D1)); +} + /********************************************************/ // https://issues.dlang.org/show_bug.cgi?id=10100 @@ -1578,15 +1602,6 @@ static assert( /********************************************************/ -void testIsDisabled() -{ - static assert(__traits(isDisabled, D1.true_)); - static assert(!__traits(isDisabled, D1.false_)); - static assert(!__traits(isDisabled, D1)); -} - -/********************************************************/ - int main() { test1(); diff --git a/gcc/testsuite/gdc.test/runnable/uda.d b/gcc/testsuite/gdc.test/runnable/uda.d index 38f84e5971d..a01a5ca6039 100644 --- a/gcc/testsuite/gdc.test/runnable/uda.d +++ b/gcc/testsuite/gdc.test/runnable/uda.d @@ -1,3 +1,38 @@ +/* +EXTRA_FILES: imports/a9741.d +TEST_OUTPUT: +--- +tuple(3, 4, 7, (SSS)) +tuple(3, 4, 7, (SSS)) +7 +SSS +tuple("hello") +tuple('c') +tuple((FFF)) +tuple(10) +tuple(20) +tuple(30) +tuple((Test6)) +tuple(Test7(3, "foo")) +tuple((Test8!"foo")) +tuple((Test9!"foo")) +tuple(Test10(3)) +tuple(Test11(3)) +tuple(10) +tuple(20) +tuple() +tuple(40) +B9741 +tuple((A9741)) +tuple(1) +tuple(2) +--- + +RUN_OUTPUT: +--- +Success +--- +*/ import core.stdc.stdio; diff --git a/gcc/testsuite/gdc.test/runnable/xtest46.d b/gcc/testsuite/gdc.test/runnable/xtest46.d index 8cba4ed4a80..bf19f57c68b 100644 --- a/gcc/testsuite/gdc.test/runnable/xtest46.d +++ b/gcc/testsuite/gdc.test/runnable/xtest46.d @@ -1,5 +1,37 @@ // RUNNABLE_PHOBOS_TEST // PERMUTE_ARGS: -unittest -O -release -inline -fPIC -g +/* TEST_OUTPUT: +--- +Boo!double +Boo!int +true +int +!! immutable(int)[] +int(int i, long j = 7L) +long +C10390(C10390(C10390())) +tuple(height) +tuple(get, get) +tuple(clear) +tuple(draw, draw) +runnable/xtest46.d(149): Deprecation: `opDot` is deprecated. Use `alias this` +runnable/xtest46.d(151): Deprecation: `opDot` is deprecated. Use `alias this` +runnable/xtest46.d(152): Deprecation: `opDot` is deprecated. Use `alias this` +runnable/xtest46.d(154): Deprecation: `opDot` is deprecated. Use `alias this` +runnable/xtest46.d(181): Deprecation: `opDot` is deprecated. Use `alias this` +runnable/xtest46.d(183): Deprecation: `opDot` is deprecated. Use `alias this` +runnable/xtest46.d(184): Deprecation: `opDot` is deprecated. Use `alias this` +runnable/xtest46.d(186): Deprecation: `opDot` is deprecated. Use `alias this` +const(int) +string[] +double[] +double[] +{} +tuple("m") +true +TFunction1: extern (C) void function() +--- +*/ import std.stdio; import core.stdc.stdio;