blob: 380c10b65d1ede3816617a034905bed23efab120 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
// PR sanitizer/65019
// { dg-do compile }
// { dg-options "-fsanitize=alignment,object-size,vptr -std=c++11 -O2 -fcompare-debug" }
struct A { };
struct B { };
struct C final {
C (const A &, int);
static B *foo (const A &, int = 1);
virtual ~C ();
void *c;
};
B *
C::foo (const A &x, int y)
{
C *d = new C (x, y);
if (d->c == nullptr)
delete d;
return 0;
}
C::~C ()
{
}
|