FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.pt / explicit74.C
blobc49d16919a8901a0926b8f16275525f30ef36769
1 // Reduced from a testcase by Yotam Medini <yotam@avanticorp.com>
3 // egcs 1.1 seems to generate code that deletes a NULL pointer.
5 template <class bar> struct foo { void fuz(); ~foo(); };
6 struct baz { int i; foo<baz> j; } *p = 0;
7 template <class bar> void foo<bar>::fuz() { delete p; }
8 template <class bar> foo<bar>::~foo() { delete p; }
9 template class foo<baz>;
10 int main() { foo<baz>(); }