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
PR c++/37276
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
torture
/
pr33572.C
blob
91cd073fd229e2e62b1fe8b9bb7571e9c27a1042
1
// { dg-do run }
2
#include <vector>
3
#include <memory>
4
5
struct Foo { virtual void f() {} };
6
7
int main(int argc, char**)
8
{
9
std::auto_ptr<Foo> foo;
10
if (argc >= 0) {
11
foo.reset(new Foo());
12
} else {
13
std::vector<int> v;
14
}
15
Foo* p = foo.release();
16
p->f();
17
}