diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/crash9.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.pt/crash9.C | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/crash9.C b/gcc/testsuite/g++.old-deja/g++.pt/crash9.C new file mode 100644 index 000000000..f2d811dda --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/crash9.C @@ -0,0 +1,11 @@ +// { dg-do assemble } + +template <class T> +void f(T) {} // { dg-error "initializing" } + +class C; // { dg-error "forward declaration" } + +void g(const C& c) +{ + f(c); // { dg-error "invalid use of incomplete type" } +} |