repo.or.cz
/
gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Fortran: Fix PR 47485.
[gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
torture
/
pr33572.C
blob
7809c9733a3873eaad52a34e02575e25cbcd3b00
1
// { dg-do run }
2
// { dg-options "-std=c++98" }
3
// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
4
5
#include <vector>
6
#include <memory>
7
8
struct Foo { virtual void f() {} };
9
10
int main(int argc, char**)
11
{
12
std::auto_ptr<Foo> foo;
13
if (argc >= 0) {
14
foo.reset(new Foo());
15
} else {
16
std::vector<int> v;
17
}
18
Foo* p = foo.release();
19
p->f();
20
}