aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAlexandre Oliva <oliva@dcc.unicamp.br>1998-10-12 05:12:44 +0000
committerAlexandre Oliva <oliva@gcc.gnu.org>1998-10-12 05:12:44 +0000
commitba5494e3bcd0fa65e05d49fc88bcd23c52f8811c (patch)
tree70da5cb87352071d45a8b5a809971c9319195664 /gcc
parent9eb3f9c994d1555e902ee56c69d6d9c3914badcc (diff)
downloadgcc-ba5494e3bcd0fa65e05d49fc88bcd23c52f8811c.zip
gcc-ba5494e3bcd0fa65e05d49fc88bcd23c52f8811c.tar.gz
gcc-ba5494e3bcd0fa65e05d49fc88bcd23c52f8811c.tar.bz2
explicit74.C: New test.
* g++.old-deja/g++.pt/explicit74.C: New test. Explicit instantiation of template produces incorrect code for delete expression. From-SVN: r23006
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog9
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/explicit74.C12
2 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 84fd30f..774b13d 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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
index 0000000..5f4b2a7
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/explicit74.C
@@ -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>(); }