| OLD | NEW |
| 1 /* Test out '@catch(id foo) {...}', which should catch | 1 /* Test out '@catch(id foo) {...}', which should catch |
| 2 all uncaught exceptions. */ | 2 all uncaught exceptions. */ |
| 3 /* Developed by Ziemowit Laski <zlaski@apple.com>. */ | 3 /* Developed by Ziemowit Laski <zlaski@apple.com>. */ |
| 4 | 4 |
| 5 /* { dg-do run } */ | 5 /* { dg-do run } */ |
| 6 /* { dg-xfail-if "PR23616" { "*-*-*" } { "*" } { "" } } */ | 6 /* { dg-xfail-if "PR23616" { *-*-* } { "-fgnu-runtime" } { "-fnext-runtime" } }
*/ |
| 7 /* { dg-xfail-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } {
"-fnext-runtime" "-fgnu-runtime" } { "" } } |
| 7 /* { dg-options "-fobjc-exceptions" } */ | 8 /* { dg-options "-fobjc-exceptions" } */ |
| 8 | 9 |
| 9 #include <objc/Object.h> | 10 #include "../objc-obj-c++-shared/Object1.h" |
| 10 #include <stdio.h> | 11 #include <stdio.h> |
| 11 #include <stdlib.h> | 12 #include <stdlib.h> |
| 12 | 13 |
| 13 /* The following is not required in actual user code; we include it | 14 /* The following is not required in actual user code; we include it |
| 14 here to check that the compiler generates an internal definition of | 15 here to check that the compiler generates an internal definition of |
| 15 _setjmp that is consistent with what <setjmp.h> provides. */ | 16 _setjmp that is consistent with what <setjmp.h> provides. */ |
| 16 #include <setjmp.h> | 17 #include <setjmp.h> |
| 17 | 18 |
| 18 #define CHECK_IF(expr) if(!(expr)) abort() | 19 #define CHECK_IF(expr) if(!(expr)) abort() |
| 19 | 20 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 CHECK_IF(!receivePort); | 71 CHECK_IF(!receivePort); |
| 71 CHECK_IF(!sendPort); | 72 CHECK_IF(!sendPort); |
| 72 CHECK_IF(!cleanupPorts); | 73 CHECK_IF(!cleanupPorts); |
| 73 } | 74 } |
| 74 } | 75 } |
| 75 | 76 |
| 76 int main (void) { | 77 int main (void) { |
| 77 test((Object *)-1); | 78 test((Object *)-1); |
| 78 return 0; | 79 return 0; |
| 79 } | 80 } |
| 81 #include "../objc-obj-c++-shared/Object1-implementation.h" |
| OLD | NEW |