diff options
Diffstat (limited to 'gcc_arm/testsuite/g++.old-deja/g++.pt/crash20.C')
-rwxr-xr-x | gcc_arm/testsuite/g++.old-deja/g++.pt/crash20.C | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash20.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/crash20.C new file mode 100755 index 0000000..29b4281 --- /dev/null +++ b/gcc_arm/testsuite/g++.old-deja/g++.pt/crash20.C @@ -0,0 +1,9 @@ +// Build don't link: + +template <class T = int> +struct A { const T x; A() : x(0) { } A(T x) : x(x) { } }; + +template <class B> +void func () { B y; y = B(); } // ERROR - can't use default assignment + +int main (void) { func< A<> >(); } // ERROR - instantiated from here |