1 // { dg-do run } 2 // try throwing 0 cast to a class object 3 extern "C" void abort (); 4 extern "C" void exit (int); 5 6 struct A {}; 7 f()8void f() 9 { 10 throw (A*)0; 11 } 12 13 int main()14main() 15 { 16 int flag; 17 18 flag = 0; 19 try { 20 f(); 21 } 22 catch (A*) { 23 flag = 1; 24 } 25 26 if (!flag) 27 abort(); 28 29 exit (0); 30 } 31