diff options
Diffstat (limited to 'gcc/testsuite/gdc.test/fail_compilation/fail20771.d')
-rw-r--r-- | gcc/testsuite/gdc.test/fail_compilation/fail20771.d | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail20771.d b/gcc/testsuite/gdc.test/fail_compilation/fail20771.d new file mode 100644 index 00000000000..18e1c87980d --- /dev/null +++ b/gcc/testsuite/gdc.test/fail_compilation/fail20771.d @@ -0,0 +1,21 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/fail20771.d(19): Error: cannot pass types with postblits or copy constructors as variadic arguments +fail_compilation/fail20771.d(20): Error: cannot pass types with postblits or copy constructors as variadic arguments +--- +*/ +extern void variadic(...); + +struct S20771 +{ + int field; + this(this) { } +} + +void test() +{ + auto v = S20771(0); + variadic(v, + S20771(1)); +} |