1 /* Check that local variables that get modified inside the @try
2 block survive until the @catch block is reached. */
3 /* Developed by Ziemowit Laski <zlaski@apple.com>. */
5 #include <objc/Object.h>
10 float gf1 = 9.0, gf2 = 19.0;
13 void foo (int arg1, float *arg2)
18 int local1 = 45, local2 = 47;
19 float local3 = 3.0, local4 = 4.0;
20 register int local5 = 15;
21 static float local6 = 16.0;
32 obj2 = obj1 = [Object new];
38 @catch (Object *obj) {
39 if (local1 != 123 || local2 != 345 || local3 != 5.0 || local4 != 6.0
40 || local5 != 17 || local6 != 18.0) {
44 if(pi != &gi2 || pf != &gf2) {
48 if(!obj1 || obj1 != obj2) {
52 if(arg1 != 17 || arg2 != &gf2) {