gcc/testsuite/gdc.dg/pr94777a.d
raw| 1 | // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94777 |
| 2 | // { dg-do compile } |
| 3 | |
| 4 | extern void variadic(...); |
| 5 | |
| 6 | void f94777() |
| 7 | { |
| 8 | struct S94777 |
| 9 | { |
| 10 | int fld; |
| 11 | this(this) { } |
| 12 | } |
| 13 | auto var = S94777(0); |
| 14 | variadic(var, S94777(1)); // { dg-error "cannot pass types with postblits or copy constructors as variadic arguments" } |
| 15 | } |