From 3c0e965b93664390caac96ffed4256975878d5f7 Mon Sep 17 00:00:00 2001 From: paolo Date: Tue, 1 Dec 2009 09:19:47 +0000 Subject: [PATCH] 2009-12-01 Paolo Carlini PR c++/42057 * g++.dg/parse/crash54.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154865 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/parse/crash54.C | 15 +++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 gcc/testsuite/g++.dg/parse/crash54.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 382406f..bfc58ea 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 0000000..222082a --- /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; -- 2.7.4