diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/objc/execute/exceptions/trivial.m')
-rw-r--r-- | gcc-4.9/gcc/testsuite/objc/execute/exceptions/trivial.m | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/objc/execute/exceptions/trivial.m b/gcc-4.9/gcc/testsuite/objc/execute/exceptions/trivial.m new file mode 100644 index 000000000..d218183f3 --- /dev/null +++ b/gcc-4.9/gcc/testsuite/objc/execute/exceptions/trivial.m @@ -0,0 +1,17 @@ +#include <stdlib.h> +#include "../../../objc-obj-c++-shared/TestsuiteObject.m" + +/* do nothing except prove we can compile and link code calling the + ecceptions mechanism */ + +int main(void) +{ + @try { + int a = 1 ; + @throw [TestsuiteObject new]; + } + @catch (TestsuiteObject *obj) { + return 0; + } + abort(); +} |