re PR c++/12316 (trouble with garbage collection)
authorVolker Reichelt <reichelt@gcc.gnu.org>
Thu, 18 Sep 2003 12:12:13 +0000 (12:12 +0000)
committerVolker Reichelt <reichelt@gcc.gnu.org>
Thu, 18 Sep 2003 12:12:13 +0000 (12:12 +0000)
PR c++/12316
* testsuite/g++.dg/other/gc2.C: New test.

* cp/ChangeLog: Add PR number to patch for PR c++/12316.

From-SVN: r71517

gcc/cp/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/other/gc2.C [new file with mode: 0644]

index 8db2dc915066ae29591417cdfca0e38465624ace..33da22d46e9f5b182c1e11988389b0f80485035a 100644 (file)
@@ -1,3 +1,7 @@
+2003-09-18  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
+
+       * ChangeLog: Add PR number to patch for PR c++/12316.
+
 2003-09-18  Gabriel Dos Reis <gdr@integrable-solutions.net>
 
        * error.c (dump_type): Simplify.  Use pp_type_specifier_seq for
@@ -6,6 +10,7 @@
 
 2003-09-17  Richard Henderson  <rth@redhat.com>
 
+       PR c++/12316
        * semantics.c (expand_body): Don't save/restore input_location.
 
 2003-09-17  Mark Mitchell  <mark@codesourcery.com>
index 7bd6e69d6fd6ffae08ba16c5f3918a5aaba419f3..dcef4f4fce8bbd907068dff22bc7b497c9b8a36c 100644 (file)
@@ -1,3 +1,8 @@
+2003-09-18  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
+
+       PR c++/12316
+       * g++.dg/other/gc2.C: New test.
+
 2003-09-17  Mark Mitchell  <mark@codesourcery.com>
 
        PR c++/11991
diff --git a/gcc/testsuite/g++.dg/other/gc2.C b/gcc/testsuite/g++.dg/other/gc2.C
new file mode 100644 (file)
index 0000000..1422294
--- /dev/null
@@ -0,0 +1,38 @@
+// PR c++/12316
+// Origin: Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+
+// { dg-do compile }
+// { dg-options "--param ggc-min-expand=0 --param ggc-min-heapsize=0" }
+
+inline void FOO() {}
+
+template<typename> struct A
+{
+    A() {}
+    ~A() throw() {}
+};
+
+template<typename> struct B
+{
+    static void foo();
+    static void bar() { foo(); }
+};
+
+struct C {};
+
+template<typename> struct D : C
+{
+    D() {}
+    ~D() { B<void>::bar(); }
+};
+
+template<typename> struct E : D<void>
+{
+    static void baz() {}
+    E(A<void>) { baz(); }
+};
+
+void BAR()
+{
+    new E<void>(A<void>());
+}