re PR tree-optimization/33572 (wrong code with -O)
authorAlexandre Oliva <aoliva@redhat.com>
Mon, 8 Oct 2007 23:57:20 +0000 (23:57 +0000)
committerAlexandre Oliva <aoliva@gcc.gnu.org>
Mon, 8 Oct 2007 23:57:20 +0000 (23:57 +0000)
PR tree-optimization/33572
* g++.dg/torture/pr33572.C: Replace with complete test.

From-SVN: r129144

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

index 17060ee1f99c9d3ba8bb04e1f416735b6e15eee9..0b1e91610d6ff9bfb162b14782bcc08f82c1a72a 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 27557cd13b8d1efe39135b89a926347e40837623..096db08ff4b5ccbe6e5a9772405d521cd2abe13e 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();