From ba5494e3bcd0fa65e05d49fc88bcd23c52f8811c Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Mon, 12 Oct 1998 05:12:44 +0000 Subject: [PATCH] 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 --- gcc/testsuite/ChangeLog | 9 +++++++++ gcc/testsuite/g++.old-deja/g++.pt/explicit74.C | 12 ++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 gcc/testsuite/g++.old-deja/g++.pt/explicit74.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 84fd30f5f22d..774b13d2a381 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,14 @@ 1998-10-12 Alexandre Oliva + * 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 000000000000..5f4b2a77ce5c --- /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 + +// egcs 1.1 seems to generate code that deletes a NULL pointer. + +template struct foo { void fuz(); ~foo(); }; +struct baz { int i; foo j; } *p = 0; +template void foo::fuz() { delete p; } +template foo::~foo() { delete p; } +template class foo; +int main() { foo(); } -- 2.43.5