aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/gdc.test/compilable/cppmangle.d1
-rw-r--r--gcc/testsuite/gdc.test/compilable/deprecate14283.d8
-rw-r--r--gcc/testsuite/gdc.test/compilable/emptystatement.d19
-rw-r--r--gcc/testsuite/gdc.test/compilable/imports/imp24022.c5
-rw-r--r--gcc/testsuite/gdc.test/compilable/parens_inc.d23
-rw-r--r--gcc/testsuite/gdc.test/compilable/test23951.d10
-rw-r--r--gcc/testsuite/gdc.test/compilable/test23966.d19
-rw-r--r--gcc/testsuite/gdc.test/compilable/test24022.d30
-rw-r--r--gcc/testsuite/gdc.test/compilable/test7172.d6
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/biterrors3.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/body.d11
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ccast.d21
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/diag4596.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/enum_function.d13
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail10285.d12
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail13116.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail15896.d1
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail22729.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail22780.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail4559.d22
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/format.d21
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/reserved_version.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/scope_class.d2
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/scope_type.d16
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test23279.d14
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/typeerrors.d2
-rw-r--r--gcc/testsuite/gdc.test/runnable/betterc.d11
-rw-r--r--gcc/testsuite/gdc.test/runnable/sctor2.d5
-rw-r--r--gcc/testsuite/gdc.test/runnable/test24029.c23
-rw-r--r--gcc/testsuite/gdc.test/runnable/testcontracts.d16
30 files changed, 237 insertions, 88 deletions
diff --git a/gcc/testsuite/gdc.test/compilable/cppmangle.d b/gcc/testsuite/gdc.test/compilable/cppmangle.d
index fc74c94..264b374 100644
--- a/gcc/testsuite/gdc.test/compilable/cppmangle.d
+++ b/gcc/testsuite/gdc.test/compilable/cppmangle.d
@@ -528,7 +528,6 @@ version (CppMangle_Itanium)
static assert(basic_ostream!(char, char_traits!char).food.mangleof == "_ZNSo4foodEv");
static assert(basic_iostream!(char, char_traits!char).fooe.mangleof == "_ZNSd4fooeEv");
- static assert(func_18957_2.mangleof == `_Z12func_18957_2PSaIiE`);
static assert(func_18957_2!(allocator!int).mangleof == `_Z12func_18957_2ISaIiEET_PS1_`);
static assert(func_20413.mangleof == `_Z10func_20413St4pairIifES_IfiE`);
diff --git a/gcc/testsuite/gdc.test/compilable/deprecate14283.d b/gcc/testsuite/gdc.test/compilable/deprecate14283.d
index e91db64..fc51cf3 100644
--- a/gcc/testsuite/gdc.test/compilable/deprecate14283.d
+++ b/gcc/testsuite/gdc.test/compilable/deprecate14283.d
@@ -1,12 +1,12 @@
-// REQUIRED_ARGS: -dw
+// REQUIRED_ARGS:
// PERMUTE_ARGS:
class C
{
void bug()
{
- autoref(this); // 'auto ref' becomes non-ref parameter
- autoref(super); // 'auto ref' becomes non-ref parameter
+ autoref!(true, C)(this); // 'auto ref' becomes ref parameter
+ autoref!(false, Object)(super); // 'auto ref' becomes non-ref parameter
}
}
-void autoref(T)(auto ref T t) { static assert(__traits(isRef, t) == false); }
+void autoref(bool result, T)(auto ref T t) { static assert(__traits(isRef, t) == result); }
diff --git a/gcc/testsuite/gdc.test/compilable/emptystatement.d b/gcc/testsuite/gdc.test/compilable/emptystatement.d
new file mode 100644
index 0000000..e6bfc27
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/emptystatement.d
@@ -0,0 +1,19 @@
+/*
+REQUIRED_ARGS:
+TEST_OUTPUT:
+---
+---
+*/
+
+void foo()
+{
+ int x;;
+ enum A
+ {
+ a,
+ b,
+ c
+ };
+
+ void bar() {};
+}
diff --git a/gcc/testsuite/gdc.test/compilable/imports/imp24022.c b/gcc/testsuite/gdc.test/compilable/imports/imp24022.c
new file mode 100644
index 0000000..b65e4e1
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/imports/imp24022.c
@@ -0,0 +1,5 @@
+// https://issues.dlang.org/show_bug.cgi?id=24022
+typedef enum {
+ A = 1,
+ B,
+} E;
diff --git a/gcc/testsuite/gdc.test/compilable/parens_inc.d b/gcc/testsuite/gdc.test/compilable/parens_inc.d
new file mode 100644
index 0000000..b9d11eb
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/parens_inc.d
@@ -0,0 +1,23 @@
+// Test UnaryExp (expr)++ parsing
+
+void main(){
+ int[2] y;
+ int *x = y.ptr;
+ *(x)++=0;
+ (*(x)--)=0;
+ (*x++)=0; // ok
+ int*[] z;
+ *(z[0])++=0; //ok
+ (y[0])--;
+ *x++=0;
+}
+
+void f()
+{
+ int b;
+ (b)++;
+ int[] a;
+ b = (a)[0]++; //ok
+ (a[0])--;
+ b = (int).init; //ok
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test23951.d b/gcc/testsuite/gdc.test/compilable/test23951.d
new file mode 100644
index 0000000..e09a3d7
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test23951.d
@@ -0,0 +1,10 @@
+// https://issues.dlang.org/show_bug.cgi?id=23951
+
+struct S { int x; }
+struct T { S a; alias a this; }
+struct U { T t; }
+static assert(__traits(hasMember, T, "x"));
+static assert(__traits(hasMember, T.init, "x"));
+static assert(__traits(hasMember, U.init.t, "x"));
+static assert(__traits(hasMember, U.t, "a"));
+static assert(__traits(hasMember, U.t, "x"));
diff --git a/gcc/testsuite/gdc.test/compilable/test23966.d b/gcc/testsuite/gdc.test/compilable/test23966.d
new file mode 100644
index 0000000..71aa8ca
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test23966.d
@@ -0,0 +1,19 @@
+// https://issues.dlang.org/show_bug.cgi?id=23966
+module test23966;
+
+@("gigi")
+void fun() {}
+@("mimi")
+void fun(int) {}
+@("hihi")
+void fun(int, int) {}
+@("bibi")
+void fun()(int, ulong) {}
+
+void main()
+{
+ static foreach (t; __traits(getOverloads, test23966, "fun", true))
+ static foreach(attr; __traits(getAttributes, t))
+ {}
+
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test24022.d b/gcc/testsuite/gdc.test/compilable/test24022.d
new file mode 100644
index 0000000..f499636
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test24022.d
@@ -0,0 +1,30 @@
+// https://issues.dlang.org/show_bug.cgi?id=24022
+// EXTRA_FILES: imports/imp24022.c
+import imports.imp24022;
+
+auto some_d_func(E v) {
+ return v;
+}
+
+auto some_d_other_func() {
+ const struct R {
+ E r;
+ this(in E vparam) { r = vparam; }
+ }
+ return R(A);
+}
+
+void main(string[] args) {
+ E expected = E.A;
+ E res = some_d_func(A);
+ assert (res == A);
+ assert (res == expected);
+
+ res = some_d_func(E.B);
+ assert (res == B);
+ assert (res == E.B);
+
+ auto res2 = some_d_other_func();
+ assert (res2.r == A);
+ assert (res2.r == expected);
+}
diff --git a/gcc/testsuite/gdc.test/compilable/test7172.d b/gcc/testsuite/gdc.test/compilable/test7172.d
index 013630b..49142d7 100644
--- a/gcc/testsuite/gdc.test/compilable/test7172.d
+++ b/gcc/testsuite/gdc.test/compilable/test7172.d
@@ -1,8 +1,4 @@
-/* TEST_OUTPUT:
----
-compilable/test7172.d(14): Deprecation: `scope` as a type constraint is deprecated. Use `scope` at the usage site.
----
-*/
+
void main()
{
abstract class AbstractC{}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/biterrors3.d b/gcc/testsuite/gdc.test/fail_compilation/biterrors3.d
index f9e1df2..c5031a4 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/biterrors3.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/biterrors3.d
@@ -2,7 +2,7 @@
* TEST_OUTPUT:
---
fail_compilation/biterrors3.d(103): Error: storage class not allowed for bit-field declaration
-fail_compilation/biterrors3.d(106): Error: `d` is not a valid attribute for enum members
+fail_compilation/biterrors3.d(106): Error: expected `,` or `=` after identifier, not `:`
fail_compilation/biterrors3.d(106): Error: `:` is not a valid attribute for enum members
fail_compilation/biterrors3.d(106): Error: `3` is not a valid attribute for enum members
---
diff --git a/gcc/testsuite/gdc.test/fail_compilation/body.d b/gcc/testsuite/gdc.test/fail_compilation/body.d
new file mode 100644
index 0000000..7b718c2
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/body.d
@@ -0,0 +1,11 @@
+/* REQUIRED_ARGS: -wo -w
+TEST_OUTPUT:
+---
+fail_compilation/body.d(11): Warning: usage of identifer `body` as a keyword is obsolete. Use `do` instead.
+Error: warnings are treated as errors
+ Use -wi if you wish to treat warnings only as informational.
+---
+*/
+
+void test()
+in { } body { }
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ccast.d b/gcc/testsuite/gdc.test/fail_compilation/ccast.d
index dab2984..f1ca6c0 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ccast.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ccast.d
@@ -1,9 +1,28 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ccast.d(9): Error: C style cast illegal, use `cast(byte)i`
+fail_compilation/ccast.d(11): Error: C style cast illegal, use `cast(byte)i`
+fail_compilation/ccast.d(24): Error: C style cast illegal, use `cast(foo)5`
+fail_compilation/ccast.d(26): Error: C style cast illegal, use `cast(void*)5`
---
*/
int i;
byte b = (byte)i;
+
+void bar(int x);
+
+void main()
+{
+ (&bar)(5); // ok
+ auto foo = &bar;
+ (foo = foo)(5); // ok
+ (*foo)(5); // ok
+
+ (foo)(5); // ok
+ (bar)(5); // ok
+ (foo)5;
+
+ (void*)5;
+ (void*)(5); // semantic implicit cast error
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag4596.d b/gcc/testsuite/gdc.test/fail_compilation/diag4596.d
index f6b49d6..517b328 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/diag4596.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/diag4596.d
@@ -1,13 +1,13 @@
/*
TEST_OUTPUT:
---
-fail_compilation/diag4596.d(15): Error: `this` is not an lvalue and cannot be modified
-fail_compilation/diag4596.d(16): Error: conditional expression `1 ? this : this` is not a modifiable lvalue
fail_compilation/diag4596.d(18): Error: `super` is not an lvalue and cannot be modified
fail_compilation/diag4596.d(19): Error: conditional expression `1 ? super : super` is not a modifiable lvalue
---
*/
+
+
class NoGo4596
{
void fun()
diff --git a/gcc/testsuite/gdc.test/fail_compilation/enum_function.d b/gcc/testsuite/gdc.test/fail_compilation/enum_function.d
new file mode 100644
index 0000000..b22f2ce
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/enum_function.d
@@ -0,0 +1,13 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/enum_function.d(10): Error: function cannot have enum storage class
+fail_compilation/enum_function.d(11): Error: function cannot have enum storage class
+fail_compilation/enum_function.d(12): Error: function cannot have enum storage class
+fail_compilation/enum_function.d(13): Error: function cannot have enum storage class
+---
+*/
+enum void f1() { return; }
+enum f2() { return 5; }
+enum f3() => 5;
+enum int f4()() => 5;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail10285.d b/gcc/testsuite/gdc.test/fail_compilation/fail10285.d
index 3277b19..c88e306 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail10285.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail10285.d
@@ -1,10 +1,18 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail10285.d(9): Error: no identifier for declarator `int`
+fail_compilation/fail10285.d(13): Error: no identifier for declarator `int`
+fail_compilation/fail10285.d(14): Error: expected `,` or `=` after identifier, not `y`
+fail_compilation/fail10285.d(15): Error: expected identifier after type, not `bool`
+fail_compilation/fail10285.d(16): Error: expected identifier after type, not `int`
+fail_compilation/fail10285.d(18): Error: initializer required after `z` when type is specified
---
*/
enum
{
- int = 5
+ int = 5,
+ int x y,
+ int bool i = 3,
+ j int k = 3,
+ int z
}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail13116.d b/gcc/testsuite/gdc.test/fail_compilation/fail13116.d
index ac520d7..077fa75 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail13116.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail13116.d
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
-fail_compilation/fail13116.d(14): Error: `this` is not an lvalue and cannot be modified
+fail_compilation/fail13116.d(14): Error: returning `this` escapes a reference to parameter `this`
fail_compilation/fail13116.d(23): Error: `super` is not an lvalue and cannot be modified
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail15896.d b/gcc/testsuite/gdc.test/fail_compilation/fail15896.d
index e52503d..3fdbf4e 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail15896.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail15896.d
@@ -14,5 +14,6 @@ int func()
{
thebar +=1;
packagebar += 1;
+ thebar +=1;
return 0;
}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail22729.d b/gcc/testsuite/gdc.test/fail_compilation/fail22729.d
index 38bbfee..d0c8aa9 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail22729.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail22729.d
@@ -22,7 +22,7 @@ class Form : WidgetI
template Tuple(Specs)
{
- enum areCompatibleTuples(Tup2)(Tuple tup1, Tup2 tup2)
+ auto areCompatibleTuples(Tup2)(Tuple tup1, Tup2 tup2)
{
tup1.field == tup2;
}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail22780.d b/gcc/testsuite/gdc.test/fail_compilation/fail22780.d
index e22be9f..8d4c8a8 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail22780.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail22780.d
@@ -1,10 +1,10 @@
// https://issues.dlang.org/show_bug.cgi?id=22780
/* TEST_OUTPUT:
---
-fail_compilation/fail22780.d(8): Deprecation: `scope` as a type constraint is deprecated. Use `scope` at the usage site.
fail_compilation/fail22780.d(12): Error: variable `fail22780.test10717.c` reference to `scope class` must be `scope`
---
*/
+
scope class C10717 { }
void test10717()
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail4559.d b/gcc/testsuite/gdc.test/fail_compilation/fail4559.d
deleted file mode 100644
index 657c184..0000000
--- a/gcc/testsuite/gdc.test/fail_compilation/fail4559.d
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
-REQUIRED_ARGS:
-TEST_OUTPUT:
----
-fail_compilation/fail4559.d(13): Error: use `{ }` for an empty statement, not `;`
-fail_compilation/fail4559.d(19): Error: use `{ }` for an empty statement, not `;`
-fail_compilation/fail4559.d(21): Error: use `{ }` for an empty statement, not `;`
----
-*/
-
-void foo()
-{
- int x;;
- enum A
- {
- a,
- b,
- c
- };
-
- void bar() {};
-}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/format.d b/gcc/testsuite/gdc.test/fail_compilation/format.d
index bc40d9a..cfd30bf 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/format.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/format.d
@@ -1,10 +1,10 @@
/*
TEST_OUTPUT:
---
-fail_compilation/format.d(101): Error: function `format.printf1` `pragma(printf)` functions must be `extern(C) void printf1([parameters...], const(char)*, ...)` not `void(const(char)*, ...)`
-fail_compilation/format.d(102): Error: function `format.printf2` `pragma(printf)` functions must be `extern(C) int printf2([parameters...], const(char)*, ...)` not `extern (C) int(const(int)*, ...)`
-fail_compilation/format.d(103): Error: function `format.printf3` `pragma(printf)` functions must be `extern(C) int printf3([parameters...], const(char)*, va_list)`
-fail_compilation/format.d(104): Error: function `format.printf4` `pragma(printf)` functions must be `extern(C) int printf4([parameters...], const(char)*, ...)` not `extern (C) int(const(char)*, int, ...)`
+fail_compilation/format.d(101): Error: `pragma(printf)` function `printf1` must have `extern(C)` or `extern(C++)` linkage, not `extern(D)`
+fail_compilation/format.d(102): Error: `pragma(printf)` function `printf2` must have signature `int printf2([parameters...], const(char)*, ...)` not `extern (C) int(const(int)*, ...)`
+fail_compilation/format.d(103): Error: `pragma(printf)` function `printf3` must have signature `int printf3([parameters...], const(char)*, va_list)`
+fail_compilation/format.d(104): Error: `pragma(printf)` function `printf4` must have signature `int printf4([parameters...], const(char)*, ...)` not `extern (C) int(const(char)*, int, ...)`
---
*/
@@ -22,10 +22,13 @@ pragma(printf) extern (C) int printf7(char*, ...);
/*
TEST_OUTPUT:
---
-fail_compilation/format.d(203): Error: function `format.vprintf1` `pragma(printf)` functions must be `extern(C) void vprintf1([parameters...], const(char)*, va_list)`
-fail_compilation/format.d(204): Error: function `format.vprintf2` `pragma(printf)` functions must be `extern(C) int vprintf2([parameters...], const(char)*, va_list)`
-fail_compilation/format.d(205): Error: function `format.vprintf3` `pragma(printf)` functions must be `extern(C) int vprintf3([parameters...], const(char)*, va_list)`
-fail_compilation/format.d(206): Error: function `format.vprintf4` `pragma(printf)` functions must be `extern(C) int vprintf4([parameters...], const(char)*, va_list)`
+fail_compilation/format.d(203): Error: `pragma(printf)` function `vprintf1` must have `extern(C)` or `extern(C++)` linkage, not `extern(D)`
+fail_compilation/format.d(204): Error: `pragma(printf)` function `vprintf2` must have signature `int vprintf2([parameters...], const(char)*, va_list)`
+fail_compilation/format.d(205): Error: `pragma(printf)` function `vprintf3` must have signature `int vprintf3([parameters...], const(char)*, va_list)`
+fail_compilation/format.d(206): Error: `pragma(printf)` function `vprintf4` must have signature `int vprintf4([parameters...], const(char)*, va_list)`
+fail_compilation/format.d(207): Error: `pragma(printf)` function `vprintf5` must have C-style variadic `...` or `va_list` parameter
+fail_compilation/format.d(208): Error: `pragma(scanf)` function `vscanf1` must have `extern(C)` or `extern(C++)` linkage, not `extern(Windows)`
+fail_compilation/format.d(208): Error: `pragma(scanf)` function `vscanf1` must have signature `int vscanf1([parameters...], const(char)*, va_list)`
---
*/
@@ -37,6 +40,8 @@ pragma(printf) void vprintf1(const(char)*, va_list);
pragma(printf) extern (C) int vprintf2(const(int )*, va_list);
pragma(printf) extern (C) int vprintf3(const(char)*);
pragma(printf) extern (C) int vprintf4(const(char)*, int, va_list);
+pragma(printf) extern (C) int vprintf5(char*, int[] a...);
+pragma(scanf) extern (Windows) int vscanf1();
pragma(printf) extern (C) int vprintf5(const(char)*, va_list);
pragma(printf) extern (C) int vprintf6(immutable(char)*, va_list);
diff --git a/gcc/testsuite/gdc.test/fail_compilation/reserved_version.d b/gcc/testsuite/gdc.test/fail_compilation/reserved_version.d
index 29f96ec..f7a554c 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/reserved_version.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/reserved_version.d
@@ -118,6 +118,7 @@ fail_compilation/reserved_version.d(219): Error: version identifier `D_PostCondi
fail_compilation/reserved_version.d(220): Error: version identifier `D_ProfileGC` is reserved and cannot be set
fail_compilation/reserved_version.d(221): Error: version identifier `D_Invariants` is reserved and cannot be set
fail_compilation/reserved_version.d(222): Error: version identifier `D_Optimized` is reserved and cannot be set
+fail_compilation/reserved_version.d(223): Error: version identifier `VisionOS` is reserved and cannot be set
---
*/
@@ -242,6 +243,7 @@ version = D_PostConditions;
version = D_ProfileGC;
version = D_Invariants;
version = D_Optimized;
+version = VisionOS;
// This should work though
debug = DigitalMars;
diff --git a/gcc/testsuite/gdc.test/fail_compilation/scope_class.d b/gcc/testsuite/gdc.test/fail_compilation/scope_class.d
index bba1490..b5e1a54 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/scope_class.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/scope_class.d
@@ -1,12 +1,12 @@
/*
TEST_OUTPUT:
---
-fail_compilation/scope_class.d(10): Deprecation: `scope` as a type constraint is deprecated. Use `scope` at the usage site.
fail_compilation/scope_class.d(12): Error: functions cannot return `scope scope_class.C`
---
*/
+
scope class C { int i; } // Notice the use of `scope` here
C increment(C c)
diff --git a/gcc/testsuite/gdc.test/fail_compilation/scope_type.d b/gcc/testsuite/gdc.test/fail_compilation/scope_type.d
deleted file mode 100644
index e055013..0000000
--- a/gcc/testsuite/gdc.test/fail_compilation/scope_type.d
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
-REQUIRED_ARGS: -de
-TEST_OUTPUT:
----
-fail_compilation/scope_type.d(13): Deprecation: `scope` as a type constraint is deprecated. Use `scope` at the usage site.
-fail_compilation/scope_type.d(14): Error: `scope` as a type constraint is obsolete. Use `scope` at the usage site.
-fail_compilation/scope_type.d(15): Deprecation: `scope` as a type constraint is deprecated. Use `scope` at the usage site.
-fail_compilation/scope_type.d(16): Deprecation: `scope` as a type constraint is deprecated. Use `scope` at the usage site.
----
-*/
-
-
-scope class C { }
-scope interface I { }
-scope struct S { }
-scope enum E { e }
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test23279.d b/gcc/testsuite/gdc.test/fail_compilation/test23279.d
new file mode 100644
index 0000000..43f2d44
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test23279.d
@@ -0,0 +1,14 @@
+// https://issues.dlang.org/show_bug.cgi?id=23279
+
+/*
+TEST_OUTPUT:
+---
+fail_compilation/test23279.d(13): Error: undefined identifier `Sth`
+---
+*/
+
+class Tester
+{
+ enum a = __traits(hasMember, Tester, "setIt");
+ void setIt(Sth sth){}
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/typeerrors.d b/gcc/testsuite/gdc.test/fail_compilation/typeerrors.d
index 404a4c0..4c8576c 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/typeerrors.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/typeerrors.d
@@ -1,7 +1,6 @@
/*
TEST_OUTPUT:
---
-fail_compilation/typeerrors.d(32): Deprecation: `scope` as a type constraint is deprecated. Use `scope` at the usage site.
fail_compilation/typeerrors.d(37): Error: sequence index `4` out of bounds `[0 .. 4]`
fail_compilation/typeerrors.d(39): Error: variable `x` cannot be read at compile time
fail_compilation/typeerrors.d(40): Error: cannot have array of `void()`
@@ -25,6 +24,7 @@ fail_compilation/typeerrors.d(57): Error: slice `[2..1]` is out of range of [0..
+
template tuple(T...) { alias T tuple; }
void bar();
diff --git a/gcc/testsuite/gdc.test/runnable/betterc.d b/gcc/testsuite/gdc.test/runnable/betterc.d
index 3d8f7da..0fc32c7 100644
--- a/gcc/testsuite/gdc.test/runnable/betterc.d
+++ b/gcc/testsuite/gdc.test/runnable/betterc.d
@@ -210,3 +210,14 @@ int test20737()
tlsVar = 123;
return 0;
}
+
+/*******************************************/
+// https://issues.dlang.org/show_bug.cgi?id=22427
+void test22427()
+{
+ if("a" == "a")
+ return;
+
+ char[] p;
+ auto a = cast(int[])p;
+}
diff --git a/gcc/testsuite/gdc.test/runnable/sctor2.d b/gcc/testsuite/gdc.test/runnable/sctor2.d
index bd820e4..a574c3e 100644
--- a/gcc/testsuite/gdc.test/runnable/sctor2.d
+++ b/gcc/testsuite/gdc.test/runnable/sctor2.d
@@ -1,10 +1,5 @@
// REQUIRED_ARGS: -w -dw
// PERMUTE_ARGS:
-/* TEST_OUTPUT:
----
-runnable/sctor2.d(12): Deprecation: `scope` as a type constraint is deprecated. Use `scope` at the usage site.
----
-*/
/***************************************************/
// 15665
diff --git a/gcc/testsuite/gdc.test/runnable/test24029.c b/gcc/testsuite/gdc.test/runnable/test24029.c
new file mode 100644
index 0000000..145f2c2
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test24029.c
@@ -0,0 +1,23 @@
+// https://issues.dlang.org/show_bug.cgi?id=24029
+
+int x = 0;
+int y = 0;
+
+void a()
+{
+ (__extension__ ({ x += 2; })); // test.a.__dgliteral1
+}
+
+void b()
+{
+ (__extension__ ({ y += 1; })); // test.b.__dgliteral1
+}
+
+int main(void)
+{
+ a();
+ b();
+ __check(x == 2);
+ __check(y == 1);
+ return 0;
+}
diff --git a/gcc/testsuite/gdc.test/runnable/testcontracts.d b/gcc/testsuite/gdc.test/runnable/testcontracts.d
index 439040b..63d18fc 100644
--- a/gcc/testsuite/gdc.test/runnable/testcontracts.d
+++ b/gcc/testsuite/gdc.test/runnable/testcontracts.d
@@ -1,20 +1,4 @@
/* PERMUTE_ARGS: -inline -g -O
-TEST_OUTPUT:
----
-runnable/testcontracts.d(323): Deprecation: usage of the `body` keyword is deprecated. Use `do` instead.
-runnable/testcontracts.d(324): Deprecation: usage of the `body` keyword is deprecated. Use `do` instead.
-runnable/testcontracts.d(325): Deprecation: usage of the `body` keyword is deprecated. Use `do` instead.
-runnable/testcontracts.d(326): Deprecation: usage of the `body` keyword is deprecated. Use `do` instead.
-runnable/testcontracts.d(328): Deprecation: usage of the `body` keyword is deprecated. Use `do` instead.
-runnable/testcontracts.d(329): Deprecation: usage of the `body` keyword is deprecated. Use `do` instead.
-runnable/testcontracts.d(330): Deprecation: usage of the `body` keyword is deprecated. Use `do` instead.
-runnable/testcontracts.d(331): Deprecation: usage of the `body` keyword is deprecated. Use `do` instead.
-runnable/testcontracts.d(502): Deprecation: usage of the `body` keyword is deprecated. Use `do` instead.
-runnable/testcontracts.d(503): Deprecation: usage of the `body` keyword is deprecated. Use `do` instead.
-runnable/testcontracts.d(504): Deprecation: usage of the `body` keyword is deprecated. Use `do` instead.
-runnable/testcontracts.d(505): Deprecation: usage of the `body` keyword is deprecated. Use `do` instead.
-runnable/testcontracts.d(505): Deprecation: usage of the `body` keyword is deprecated. Use `do` instead.
----
*/
extern(C) int printf(const char*, ...);