diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 382406f5194a..bfc58ea6b3ae 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2009-12-01 Paolo Carlini + + PR c++/42057 + * g++.dg/parse/crash54.C: New. + 2009-11-30 Chao-ying Fu * gcc.target/mips/dsp-lhx.c: New test. diff --git a/gcc/testsuite/g++.dg/parse/crash54.C b/gcc/testsuite/g++.dg/parse/crash54.C new file mode 100644 index 000000000000..222082ab79b7 --- /dev/null +++ b/gcc/testsuite/g++.dg/parse/crash54.C @@ -0,0 +1,15 @@ +// PR c++/42057 + +struct A; // { dg-error "forward declaration" } + +struct B +{ + virtual B* foo(A); +}; + +struct C : virtual B +{ + virtual C* foo(A) { return 0; } // { dg-error "incomplete type" } +}; + +C c;