explicit74.C: New test.
authorAlexandre Oliva <oliva@dcc.unicamp.br>
Mon, 12 Oct 1998 05:12:44 +0000 (05:12 +0000)
committerAlexandre Oliva <oliva@gcc.gnu.org>
Mon, 12 Oct 1998 05:12:44 +0000 (05:12 +0000)
* g++.old-deja/g++.pt/explicit74.C: New test.  Explicit
  instantiation of template produces incorrect code for delete
  expression.

From-SVN: r23006

gcc/testsuite/ChangeLog
gcc/testsuite/g++.old-deja/g++.pt/explicit74.C [new file with mode: 0644]

index 84fd30f5f22dfef86ee8c22b1976c3309f669bca..774b13d2a381b23dfea5b4265085ea986994914c 100644 (file)
@@ -1,5 +1,14 @@
 1998-10-12  Alexandre Oliva  <oliva@dcc.unicamp.br>
 
+       * g++.old-deja/g++.pt/explicit74.C: New test.  Explicit
+       instantiation of template produces incorrect code for delete
+       expression.
+
+       * g++.old-deja/g++.pt/instantiate5.C: New test.  `global
+       constructors' name is not unique
+       * g++.old-deja/g++.pt/instantiate5.cc: ditto
+       * g++.old-deja/g++.pt/instantiate5-main.cc: ditto
+
        * g++.old-deja/g++.other/init8.C: New test.  uninitialized
        automatic array of const is ill-formed
 
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/explicit74.C b/gcc/testsuite/g++.old-deja/g++.pt/explicit74.C
new file mode 100644 (file)
index 0000000..5f4b2a7
--- /dev/null
@@ -0,0 +1,12 @@
+// execution test - XFAIL *-*-*
+
+// Reduced from a testcase by Yotam Medini <yotam@avanticorp.com>
+
+// egcs 1.1 seems to generate code that deletes a NULL pointer.
+
+template <class bar> struct foo { void fuz(); ~foo(); };
+struct baz { int i; foo<baz> j; } *p = 0;
+template <class bar> void foo<bar>::fuz() { delete p; }
+template <class bar> foo<bar>::~foo() { delete p; }
+template class foo<baz>;
+int main() { foo<baz>(); }