OSDN Git Service

2008-01-16 Richard Guenther <rguenther@suse.de>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / torture / pr33572.C
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 }