1 // PR middle-end/28493
2 
3 extern "C" void abort ();
4 
5 struct Command *ptr;
6 
7 struct Command {
CommandCommand8   Command() { ptr = this; }
~CommandCommand9   virtual ~Command() { if (ptr != this) abort(); }
10 };
11 
tryfunc()12 void tryfunc()
13 {
14   Command cmd;
15   throw 1;
16 }
17 
main()18 int main()
19 {
20   try
21     {
22       tryfunc();
23     }
24   catch (int) { }
25 }
26