blob: 8dfaa52b6bb7b684fdad8b4e218a308dc701d9af (
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
|
// { dg-options "-O2 -fdump-tree-ehcleanup1-details" }
extern void can_throw ();
class a
{
public:
~a ()
{
if (0)
can_throw ();
}
};
void
t (void)
{
class a a;
can_throw ();
}
// We ought to remove implicit cleanup, since destructor is empty.
// { dg-final { scan-tree-dump-times "Empty EH handler" 1 "ehcleanup1" } }
//
// And as a result also contained control flow.
// { dg-final { scan-tree-dump-times "Removing unreachable" 2 "ehcleanup1" } }
//
// { dg-final { cleanup-tree-dump "ehcleanup1" } }
|