| 1 |
// { dg-do assemble } |
| 2 |
// { dg-options "-fexceptions" } |
| 3 |
// GROUPS passed exceptions |
| 4 |
// except file |
| 5 |
// Message-Id: <[email protected]> |
| 6 |
// From: [email protected] |
| 7 |
// Subject: exceptions broken |
| 8 |
// Date: Wed, 7 Jul 1993 16:56:52 +0200 (MET DST) |
| 9 |
|
| 10 |
class ball { |
| 11 |
public: int dummy; |
| 12 |
ball() : dummy(0) { ; } |
| 13 |
}; |
| 14 |
|
| 15 |
void pitcher() |
| 16 |
{ |
| 17 |
throw ball(); |
| 18 |
} |
| 19 |
|
| 20 |
void catcher() |
| 21 |
{ |
| 22 |
try // <=== gcc 2.* fails here |
| 23 |
{ |
| 24 |
pitcher(); |
| 25 |
} |
| 26 |
catch (ball) { |
| 27 |
/* sleepy catcher doing nothing */ ; |
| 28 |
} |
| 29 |
} |
| 30 |
|
| 31 |
int main() |
| 32 |
{ |
| 33 |
catcher(); |
| 34 |
} |