summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.test/fail_compilation/fail20772.d
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gdc.test/fail_compilation/fail20772.d')
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail20772.d22
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail20772.d b/gcc/testsuite/gdc.test/fail_compilation/fail20772.d
new file mode 100644
index 00000000000..a2fdac68798
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail20772.d
@@ -0,0 +1,22 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail20772.d(20): Error: cannot pass types with postblits or copy constructors as variadic arguments
+fail_compilation/fail20772.d(21): Error: cannot pass types with postblits or copy constructors as variadic arguments
+---
+*/
+extern void variadic(...);
+
+struct S20772
+{
+ int field;
+ this(int) { }
+ this(ref S20772 o) { }
+}
+
+void test()
+{
+ auto v = S20772(0);
+ variadic(v,
+ S20772(1));
+}