diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/crash20.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.pt/crash20.C | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/crash20.C b/gcc/testsuite/g++.old-deja/g++.pt/crash20.C index 44f6c8c447a..f910294e65c 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/crash20.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/crash20.C @@ -1,9 +1,16 @@ -// { dg-do assemble } +// { dg-do compile } template <class T = int> -struct A { const T x; A() : x(0) { } A(T x) : x(x) { } }; +struct A { // { dg-error "assignment" } + const T x; + A() : x(0) { } A(T x) : x(x) { } +}; template <class B> -void func () { B y; y = B(); } // { dg-error "" } can't use default assignment +void func () +{ + B y; + y = B(); // { dg-error "synthesized" } +} int main (void) { func< A<> >(); } |