1 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, November 2010. */
3 /* FIXME: This does not test running the code, because Objective-C exceptions at the moment
4 do not execute correctly in Objective-C++. See PR objc++/23616. Once that is fixed,
5 this test should be changed to use 'dg-do run' instead of just 'dg-do compile'. */
6 /* { dg-do compile } */
7 /* { dg-options "-fobjc-exceptions" } */
9 /* This test checks the syntax @catch (...) which catches any
10 exceptions. Check that code using it runs correctly. */
12 #include "../objc-obj-c++-shared/TestsuiteObject.m"
15 @interface MyObject : TestsuiteObject
18 @implementation MyObject
47 if (test ([MyObject new]) != 5)
50 if (test ([TestsuiteObject new]) != 6)