summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.eh/tmpl2.C
blob: dd2801d26b3ca57dea8bff78c7daca0ba924c239 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// { dg-do assemble }
// { dg-options "-O" }

// 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;
}