1 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, November 2010. */
3 /* { dg-options "-fobjc-exceptions" } */
4 /* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
5 /* { dg-additional-sources "../objc-obj-c++-shared/Object1.m" } */
7 /* This test checks the syntax @catch (...) which catches any
8 exceptions. Check that code using it runs correctly. */
10 #include "../objc-obj-c++-shared/Object1.h"
13 @interface MyObject : Object
16 @implementation MyObject
45 if (test ([MyObject new]) != 5)
48 if (test ([Object new]) != 6)