* g++.old-deja/g++.eh/tmpl2.C: New test.
authorAlexandre Oliva <oliva@dcc.unicamp.br>
Sat, 5 Dec 1998 22:37:32 +0000 (22:37 +0000)
committerAlexandre Oliva <oliva@gcc.gnu.org>
Sat, 5 Dec 1998 22:37:32 +0000 (22:37 +0000)
From-SVN: r24112

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

index c68ef51c1cb74a8b4504fda26476f15ecc823b1a..fa6e1384793f6bc91f650cf32ef68a501d21da91 100644 (file)
@@ -1,3 +1,7 @@
+1998-12-06  Alexandre Oliva  <oliva@dcc.unicamp.br>
+
+       * g++.old-deja/g++.eh/tmpl2.C: New test.
+
 1998-12-04  Alexandre Oliva  <oliva@dcc.unicamp.br>
 
        * 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 (file)
index 0000000..af3dc7b
--- /dev/null
@@ -0,0 +1,33 @@
+// Build don't link:
+// Special g++ flags: -O
+// crash test - XFAIL i*86-*-linux*
+
+// Posted by H. J. Lu <hjl@lucon.org>
+
+template<class T>
+class FixSeq
+{
+public:
+    void append(const T&);
+};
+class foo
+{
+public:  
+    void setupIR();
+};
+typedef FixSeq<foo *> bar;
+extern void dummy (foo *);
+void *
+foobar (bar &x, foo *p)
+{
+    try
+    {
+        p -> setupIR();
+    }
+    catch(...)
+    {
+        dummy (p);
+    }
+    x.append(p);
+    return p;
+}