From 658269bda2c626a5a27708ea5c28ba0b74fb9248 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Sat, 5 Dec 1998 22:37:32 +0000 Subject: [PATCH] * g++.old-deja/g++.eh/tmpl2.C: New test. From-SVN: r24112 --- gcc/testsuite/ChangeLog | 4 +++ gcc/testsuite/g++.old-deja/g++.eh/tmpl2.C | 33 +++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 gcc/testsuite/g++.old-deja/g++.eh/tmpl2.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c68ef51c1cb..fa6e1384793 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +1998-12-06 Alexandre Oliva + + * g++.old-deja/g++.eh/tmpl2.C: New test. + 1998-12-04 Alexandre Oliva * g++.old-deja/g++.other/using5.C: usified using[567].C here diff --git a/gcc/testsuite/g++.old-deja/g++.eh/tmpl2.C b/gcc/testsuite/g++.old-deja/g++.eh/tmpl2.C new file mode 100644 index 00000000000..af3dc7bc12a --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.eh/tmpl2.C @@ -0,0 +1,33 @@ +// Build don't link: +// Special g++ flags: -O +// crash test - XFAIL i*86-*-linux* + +// Posted by H. J. Lu + +template +class FixSeq +{ +public: + void append(const T&); +}; +class foo +{ +public: + void setupIR(); +}; +typedef FixSeq bar; +extern void dummy (foo *); +void * +foobar (bar &x, foo *p) +{ + try + { + p -> setupIR(); + } + catch(...) + { + dummy (p); + } + x.append(p); + return p; +}