summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/other/dtor1.C
blob: 90ca3800728d83f085520993fe4e8586bd7ce6c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* { dg-do compile } */
// PR C++/30303
// This used to ICE because we did not return NULL
// in grokfndecl when an error happened.

struct Ifoo
{
virtual ~Ifoo(){}
};
struct foo : Ifoo
{
 foo(){};
};
foo::~foo() // { dg-error "definition of implicitly-declared" }
{
delete this;
}