1 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, November 2010. */
2 /* { dg-options "-fobjc-exceptions" } */
4 /* FIXME: This does not test running the code, because Objective-C exceptions at the moment
5 do not execute correctly in Objective-C++. See PR objc++/23616. Once that is fixed,
6 this test should be changed to use 'dg-run' instead of just 'dg-compile'. */
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/Object1.h"
15 @interface MyObject : Object
18 @implementation MyObject
47 if (test ([MyObject new]) != 5)
50 if (test ([Object new]) != 6)