OSDN Git Service

PR tree-optimization/33572
authoraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 8 Oct 2007 23:57:20 +0000 (23:57 +0000)
committeraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 8 Oct 2007 23:57:20 +0000 (23:57 +0000)
* g++.dg/torture/pr33572.C: Replace with complete test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@129144 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/torture/pr33572.C

index 17060ee..0b1e916 100644 (file)
@@ -1,3 +1,8 @@
+2007-10-08  Alexandre Oliva  <aoliva@redhat.com>
+
+       PR tree-optimization/33572
+       * g++.dg/torture/pr33572.C: Replace with complete test.
+
 2007-10-08  Tobias Schl├╝ter  <tobi@gcc.gnu.org>
 
        PR fortran/33689
index 27557cd..096db08 100644 (file)
@@ -1,36 +1,16 @@
 // { dg-do run }
-namespace __gnu_cxx {
-       template<bool> struct __pool {
-               void _M_reclaim_block(char* p, unsigned long bytes);
-       };
-}
-
-struct vector {
-       ~vector() { deallocate(0); }
-       void deallocate(int* p) {
-               if (p) {
-                       static __gnu_cxx::__pool<true> pool;
-                       pool._M_reclaim_block((char*)0, 0);
-               }
-       }
-};
-
-struct Foo { virtual void f() { } };
+#include <vector>
+#include <memory>
 
-struct auto_ptr {
-       Foo* ptr;
-       auto_ptr() : ptr(0) { }
-       ~auto_ptr() { delete ptr; }
-       Foo* release() { Foo* tmp = ptr; ptr = 0; return tmp; }
-       void reset(Foo* p) { ptr = p; }
-};
+struct Foo { virtual void f() {} };
 
-int main(int argc, char**) {
-       auto_ptr foo;
+int main(int argc, char**)
+{
+       std::auto_ptr<Foo> foo;
        if (argc) {
                foo.reset(new Foo());
        } else {
-               vector v;
+               std::vector<int> v;
        }
        Foo* p = foo.release();
        p->f();