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
// PR middle-end/28493 extern "C" void abort (); struct Command *ptr; struct Command { Command() { ptr = this; } virtual ~Command() { if (ptr != this) abort(); } }; void tryfunc() { Command cmd; throw 1; } int main() { try { tryfunc(); } catch (int) { } }