summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/parse/crash54.C
blob: 222082ab79b7678c08fd4c83452104c5c1f37209 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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;