Fortran: Fix PR 47485.
[gcc.git] / gcc / testsuite / g++.dg / torture / pr33572.C
blob7809c9733a3873eaad52a34e02575e25cbcd3b00
1 // { dg-do run }
2 // { dg-options "-std=c++98" }
3 // { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
5 #include <vector>
6 #include <memory>
8 struct Foo { virtual void f() {} };
10 int main(int argc, char**)
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();