repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Fix test-suite fallout of default -Wreturn-type.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
ubsan
/
pr65019.C
blob
380c10b65d1ede3816617a034905bed23efab120
1
// PR sanitizer/65019
2
// { dg-do compile }
3
// { dg-options "-fsanitize=alignment,object-size,vptr -std=c++11 -O2 -fcompare-debug" }
4
5
struct A { };
6
struct B { };
7
struct C final {
8
C (const A &, int);
9
static B *foo (const A &, int = 1);
10
virtual ~C ();
11
void *c;
12
};
13
14
B *
15
C::foo (const A &x, int y)
16
{
17
C *d = new C (x, y);
18
if (d->c == nullptr)
19
delete d;
20
21
return 0;
22
}
23
24
C::~C ()
25
{
26
}